<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/kernel/timer.c, branch v2.6.38.8</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.38.8</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.38.8'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2011-02-08T15:18:39+00:00</updated>
<entry>
<title>Revert "lockdep, timer: Fix del_timer_sync() annotation"</title>
<updated>2011-02-08T15:18:39+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2011-02-08T14:18:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7ff207928eb0761fa6b6c39eda82ac07a5241acf'/>
<id>urn:sha1:7ff207928eb0761fa6b6c39eda82ac07a5241acf</id>
<content type='text'>
Both attempts at trying to allow softirq usage for
del_timer_sync() failed (produced bogus warnings),
so revert the commit for this release:

  f266a5110d45: lockdep, timer: Fix del_timer_sync() annotation

and try again later.

Reported-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
LKML-Reference: &lt;1297174680.13327.107.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep, timer: Fix del_timer_sync() annotation</title>
<updated>2011-02-04T09:31:22+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2011-02-03T14:09:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f266a5110d453b7987194460ac7edd31f1a5426c'/>
<id>urn:sha1:f266a5110d453b7987194460ac7edd31f1a5426c</id>
<content type='text'>
Calling local_bh_enable() will want to actually start processing
softirqs, which isn't a good idea since this can get called with IRQs
disabled.

Cure this by using _local_bh_enable() which doesn't start processing
softirqs, and use raw_local_irq_save() to avoid any softirqs from
happening without letting lockdep think IRQs are in fact disabled.

Reported-by: Nick Bowler &lt;nbowler@elliptictech.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Reviewed-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
LKML-Reference: &lt;20110203141548.039540914@chello.nl&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2011-01-06T18:42:43+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-06T18:42:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dda5f0a372873bca5f0b1d1866d7784dffd8b675'/>
<id>urn:sha1:dda5f0a372873bca5f0b1d1866d7784dffd8b675</id>
<content type='text'>
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  MAINTAINERS: Update timer related entries
  timers: Use this_cpu_read
  timerqueue: Make timerqueue_getnext() static inline
  hrtimer: fix timerqueue conversion flub
  hrtimers: Convert hrtimers to use timerlist infrastructure
  timers: Fixup allmodconfig build issue
  timers: Rename timerlist infrastructure to timerqueue
  timers: Introduce timerlist infrastructure.
  hrtimer: Remove stale comment on curr_timer
  timer: Warn when del_timer_sync() is called in hardirq context
  timer: Del_timer_sync() can be used in softirq context
  timer: Make try_to_del_timer_sync() the same on SMP and UP
  posix-timers: Annotate lock_timer()
  timer: Permit statically-declared work with deferrable timers
  time: Use ARRAY_SIZE macro in timecompare.c
  timer: Initialize the field slack of timer_list
  timer_list: Remove alignment padding on 64 bit when CONFIG_TIMER_STATS
  time: Compensate for rounding on odd-frequency clocksources

Fix up trivial conflict in MAINTAINERS
</content>
</entry>
<entry>
<title>timers: Use this_cpu_read</title>
<updated>2010-12-12T17:38:09+00:00</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2010-11-30T20:05:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7496351ad87e61e96b49dd7b43c6534e3401f566'/>
<id>urn:sha1:7496351ad87e61e96b49dd7b43c6534e3401f566</id>
<content type='text'>
Eric asked for this.

[tglx: Because it generates faster code according to Erics ]

Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
Cc: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: linux-mm@kvack.org
LKML-Reference: &lt;alpine.DEB.2.00.1011301404490.4039@router.home&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>nohz: Fix get_next_timer_interrupt() vs cpu hotplug</title>
<updated>2010-12-08T19:15:07+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2010-12-01T09:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dbd87b5af055a0cc9bba17795c9a2b0d17795389'/>
<id>urn:sha1:dbd87b5af055a0cc9bba17795c9a2b0d17795389</id>
<content type='text'>
This fixes a bug as seen on 2.6.32 based kernels where timers got
enqueued on offline cpus.

If a cpu goes offline it might still have pending timers. These will
be migrated during CPU_DEAD handling after the cpu is offline.
However while the cpu is going offline it will schedule the idle task
which will then call tick_nohz_stop_sched_tick().

That function in turn will call get_next_timer_intterupt() to figure
out if the tick of the cpu can be stopped or not. If it turns out that
the next tick is just one jiffy off (delta_jiffies == 1)
tick_nohz_stop_sched_tick() incorrectly assumes that the tick should
not stop and takes an early exit and thus it won't update the load
balancer cpu.

Just afterwards the cpu will be killed and the load balancer cpu could
be the offline cpu.

On 2.6.32 based kernel get_nohz_load_balancer() gets called to decide
on which cpu a timer should be enqueued (see __mod_timer()). Which
leads to the possibility that timers get enqueued on an offline cpu.
These will never expire and can cause a system hang.

This has been observed 2.6.32 kernels. On current kernels
__mod_timer() uses get_nohz_timer_target() which doesn't have that
problem. However there might be other problems because of the too
early exit tick_nohz_stop_sched_tick() in case a cpu goes offline.

The easiest and probably safest fix seems to be to let
get_next_timer_interrupt() just lie and let it say there isn't any
pending timer if the current cpu is offline.

I also thought of moving migrate_[hr]timers() from CPU_DEAD to
CPU_DYING, but seeing that there already have been fixes at least in
the hrtimer code in this area I'm afraid that this could add new
subtle bugs.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;20101201091109.GA8984@osiris.boeblingen.de.ibm.com&gt;
Cc: stable@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Cure more NO_HZ load average woes</title>
<updated>2010-12-08T19:15:04+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-11-30T18:48:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0f004f5a696a9434b7214d0d3cbd0525ee77d428'/>
<id>urn:sha1:0f004f5a696a9434b7214d0d3cbd0525ee77d428</id>
<content type='text'>
There's a long-running regression that proved difficult to fix and
which is hitting certain people and is rather annoying in its effects.

Damien reported that after 74f5187ac8 (sched: Cure load average vs
NO_HZ woes) his load average is unnaturally high, he also noted that
even with that patch reverted the load avgerage numbers are not
correct.

The problem is that the previous patch only solved half the NO_HZ
problem, it addressed the part of going into NO_HZ mode, not of
comming out of NO_HZ mode. This patch implements that missing half.

When comming out of NO_HZ mode there are two important things to take
care of:

 - Folding the pending idle delta into the global active count.
 - Correctly aging the averages for the idle-duration.

So with this patch the NO_HZ interaction should be complete and
behaviour between CONFIG_NO_HZ=[yn] should be equivalent.

Furthermore, this patch slightly changes the load average computation
by adding a rounding term to the fixed point multiplication.

Reported-by: Damien Wyart &lt;damien.wyart@free.fr&gt;
Reported-by: Tim McGrath &lt;tmhikaru@gmail.com&gt;
Tested-by: Damien Wyart &lt;damien.wyart@free.fr&gt;
Tested-by: Orion Poplawski &lt;orion@cora.nwra.com&gt;
Tested-by: Kyle McMartin &lt;kyle@mcmartin.ca&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: stable@kernel.org
Cc: Chase Douglas &lt;chase.douglas@canonical.com&gt;
LKML-Reference: &lt;1291129145.32004.874.camel@laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>timer: Warn when del_timer_sync() is called in hardirq context</title>
<updated>2010-10-22T12:46:25+00:00</updated>
<author>
<name>Yong Zhang</name>
<email>yong.zhang@windriver.com</email>
</author>
<published>2010-10-20T22:57:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=466bd3030973910118ca601da8072be97a1e2209'/>
<id>urn:sha1:466bd3030973910118ca601da8072be97a1e2209</id>
<content type='text'>
Add explict warning when del_timer_sync() is called in hardirq
context.

Signed-off-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&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>timer: Del_timer_sync() can be used in softirq context</title>
<updated>2010-10-22T12:46:25+00:00</updated>
<author>
<name>Yong Zhang</name>
<email>yong.zhang@windriver.com</email>
</author>
<published>2010-10-20T22:57:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1118e2cd33d47254854e1ba3ba8e32802ff14fdf'/>
<id>urn:sha1:1118e2cd33d47254854e1ba3ba8e32802ff14fdf</id>
<content type='text'>
Actually we have used del_timer_sync() in softirq context for a long time,
e.g. in __dst_free()::cancel_delayed_work().

So change the comments of it to warn on hardirq context only, and make
lockdep know about this change.

Signed-off-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&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>timer: Make try_to_del_timer_sync() the same on SMP and UP</title>
<updated>2010-10-22T12:46:25+00:00</updated>
<author>
<name>Yong Zhang</name>
<email>yong.zhang@windriver.com</email>
</author>
<published>2010-10-20T22:57:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6f1bc451e6a79470b122a37ee1fc6bbca450f444'/>
<id>urn:sha1:6f1bc451e6a79470b122a37ee1fc6bbca450f444</id>
<content type='text'>
On UP try_to_del_timer_sync() is mapped to del_timer() which does not
take the running timer callback into account, so it has different
semantics.

Remove the SMP dependency of try_to_del_timer_sync() by using
base-&gt;running_timer in the UP case as well.

[ tglx: Removed set_running_timer() inline and tweaked the changelog ]

Signed-off-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&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>timer: Permit statically-declared work with deferrable timers</title>
<updated>2010-10-21T15:30:06+00:00</updated>
<author>
<name>Phil Carmody</name>
<email>ext-phil.2.carmody@nokia.com</email>
</author>
<published>2010-10-20T22:57:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dd6414b50fa2b1cd247a8aa8f8bd42414b7453e1'/>
<id>urn:sha1:dd6414b50fa2b1cd247a8aa8f8bd42414b7453e1</id>
<content type='text'>
Currently, you have to just define a delayed_work uninitialised, and then
initialise it before first use.  That's a tad clumsy.  At risk of playing
mind-games with the compiler, fooling it into doing pointer arithmetic
with compile-time-constants, this lets clients properly initialise delayed
work with deferrable timers statically.

This patch was inspired by the issues which lead Artem Bityutskiy to
commit 8eab945c5616fc984 ("sunrpc: make the cache cleaner workqueue
deferrable").

Signed-off-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
Acked-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Cc: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
