<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/hrtimer.c, branch v2.6.26</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.26</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-07-03T18:36:48Z</updated>
<entry>
<title>hrtimer: prevent migration for raising softirq</title>
<updated>2008-07-03T18:36:48Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2008-07-03T18:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee3ece830f6db9837f7ac67008f532a8c1e755f4'/>
<id>urn:sha1:ee3ece830f6db9837f7ac67008f532a8c1e755f4</id>
<content type='text'>
Due to a possible deadlock, the waking of the softirq was pushed outside
of the hrtimer base locks. See commit 0c96c5979a522c3323c30a078a70120e29b5bdbc

Unfortunately this allows the task to migrate after setting up the softirq
and raising it. Since softirqs run a queue that is per-cpu we may raise the
softirq on the wrong CPU and this will keep the queued softirq task from
running.

To solve this issue, this patch disables preemption around the releasing
of the hrtimer lock and raising of the softirq.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>hrtimer: remove duplicate helper function</title>
<updated>2008-05-03T16:11:48Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>oliver@hartkopp.net</email>
</author>
<published>2008-04-30T21:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4346f65426cbceb64794b468e4af6f5632d58c5e'/>
<id>urn:sha1:4346f65426cbceb64794b468e4af6f5632d58c5e</id>
<content type='text'>
The helper function hrtimer_callback_running() is used in
kernel/hrtimer.c as well as in the updated net/can/bcm.c which now
supports hrtimers. Moving the helper function to hrtimer.h removes the
duplicate definition in the C-files.

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>add hrtimer specific debugobjects code</title>
<updated>2008-04-30T15:29:53Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-04-30T07:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=237fc6e7a35076f584b9d0794a5204fe4bd9b9e5'/>
<id>urn:sha1:237fc6e7a35076f584b9d0794a5204fe4bd9b9e5</id>
<content type='text'>
hrtimers have now dynamic users in the network code.  Put them under
debugobjects surveillance as well.

Add calls to the generic object debugging infrastructure and provide fixup
functions which allow to keep the system alive when recoverable problems have
been detected by the object debugging core code.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>hrtimer: raise softirq unlocked to avoid circular lock dependency</title>
<updated>2008-04-28T20:22:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-04-28T07:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c96c5979a522c3323c30a078a70120e29b5bdbc'/>
<id>urn:sha1:0c96c5979a522c3323c30a078a70120e29b5bdbc</id>
<content type='text'>
The scheduler hrtimer bits in 2.6.25 introduced a circular lock
dependency in a rare code path:

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.25-sched-devel.git-x86-latest.git #19
-------------------------------------------------------
X/2980 is trying to acquire lock:
 (&amp;rq-&gt;rq_lock_key#2){++..}, at: [&lt;ffffffff80230146&gt;] task_rq_lock+0x56/0xa0

but task is already holding lock:
 (&amp;cpu_base-&gt;lock){++..}, at: [&lt;ffffffff80257ae1&gt;] lock_hrtimer_base+0x31/0x60

which lock already depends on the new lock.

The scenario which leads to this is:

posix-timer signal is delivered
 -&gt; posix-timer is rearmed
    timer is already expired in hrtimer_enqueue()
     -&gt; softirq is raised

To prevent this we need to move the raise of the softirq out of the
base-&gt;lock protected code path.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@kernel.org
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
</content>
</entry>
<entry>
<title>hrtimer: timeout too long when using HRTIMER_CB_SOFTIRQ</title>
<updated>2008-04-27T16:26:43Z</updated>
<author>
<name>Bodo Stroesser</name>
<email>bstroesser@fujitsu-siemens.com</email>
</author>
<published>2008-04-26T21:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7b41a24bfb5d7fa02f7b49be1293d468814e424'/>
<id>urn:sha1:d7b41a24bfb5d7fa02f7b49be1293d468814e424</id>
<content type='text'>
When using hrtimer with timer-&gt;cb_mode == HRTIMER_CB_SOFTIRQ
in some cases the clockevent is not programmed.
This happens, if:
 - a timer is rearmed while it's state is HRTIMER_STATE_CALLBACK
 - hrtimer_reprogram() returns -ETIME, when it is called after
   CALLBACK is finished. This occurs if the new timer-&gt;expires
   is in the past when CALLBACK is done.
In this case, the timer needs to be removed from the tree and put
onto the pending list again.

The patch is against 2.6.22.5, but AFAICS, it is relevant
for 2.6.25 also (in run_hrtimer_pending()).

Signed-off-by: Bodo Stroesser &lt;bstroesser@fujitsu-siemens.com&gt;
Cc: stable@kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>hrtimer: optimize the softirq time optimization</title>
<updated>2008-04-21T05:59:51Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-04-19T19:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=259aae864ceeb2b34e7bafa1ce18d096a357fab2'/>
<id>urn:sha1:259aae864ceeb2b34e7bafa1ce18d096a357fab2</id>
<content type='text'>
The previous optimization did not take the case into account where a
clock provides its own softirq_get_time() function.

Check for the availablitiy of the clock get time function first and
then check if we need to retrieve the time for both clocks via
hrtimer_softirq_gettime() to avoid a double evaluation of time in that
case as well.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>hrtimer: reduce calls to hrtimer_get_softirq_time()</title>
<updated>2008-04-21T05:59:51Z</updated>
<author>
<name>Dimitri Sivanich</name>
<email>sivanich@sgi.com</email>
</author>
<published>2008-04-18T20:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=833883d9ac4cfb31c1c4419335e68e6895a05b6b'/>
<id>urn:sha1:833883d9ac4cfb31c1c4419335e68e6895a05b6b</id>
<content type='text'>
It seems that hrtimer_run_queues() is calling hrtimer_get_softirq_time() more
often than it needs to.  This can cause frequent contention on systems with
large numbers of processors/cores.

With this patch, hrtimer_run_queues only calls hrtimer_get_softirq_time() if
there is a pending timer in one of the hrtimer bases, and only once.

This also combines hrtimer_run_queues() and the inline run_hrtimer_queue()
into one function.

[ tglx@linutronix.de: coding style ]

Signed-off-by: Dimitri Sivanich &lt;sivanich@sgi.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>hrtimers: simplify lockdep handling</title>
<updated>2008-04-17T10:22:31Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-04-04T18:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e60e05fdc7344415fa69a3883b11f65db967b47'/>
<id>urn:sha1:8e60e05fdc7344415fa69a3883b11f65db967b47</id>
<content type='text'>
In order to avoid the false positive from lockdep, each per-cpu base-&gt;lock has
the separate lock class and migrate_hrtimers() uses double_spin_lock().

This is overcomplicated: except for migrate_hrtimers() we never take 2 locks
at once, and migrate_hrtimers() can use spin_lock_nested().

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>hrtimer: use nanosleep specific restart_block fields</title>
<updated>2008-04-17T10:22:30Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-02-10T08:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=029a07e0311c7fef968d44b50beca53969cee40b'/>
<id>urn:sha1:029a07e0311c7fef968d44b50beca53969cee40b</id>
<content type='text'>
Convert all the nanosleep related users of restart_block to the
new nanosleep specific restart_block fields.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>hrtimer: catch expired CLOCK_REALTIME timers early</title>
<updated>2008-02-14T21:08:30Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-02-13T23:58:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63070a79ba482c274bad10ac8c4b587a3e011f2c'/>
<id>urn:sha1:63070a79ba482c274bad10ac8c4b587a3e011f2c</id>
<content type='text'>
A CLOCK_REALTIME timer, which has an absolute expiry time less than
the clock realtime offset calls with a negative delta into the clock
events code and triggers the WARN_ON() there.

This is a false positive and needs to be prevented. Check the result
of timer-&gt;expires - timer-&gt;base-&gt;offset right away and return -ETIME
right away.

Thanks to Frans Pop, who reported the problem and tested the fixes.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Frans Pop &lt;elendil@planet.nl&gt;
</content>
</entry>
</feed>
