[PATCH] highres/dyntick: prevent xtime lock contention
commitcfc00cc62c33b8a46df9eb3228e142e3f9535711
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 May 2007 07:30:03 +0000 (8 00:30 -0700)
committerChris Wright <chrisw@sous-sol.org>
Wed, 23 May 2007 21:32:46 +0000 (23 14:32 -0700)
tree0049c451864bd2c2b3c63ccdb83aa69072d040d6
parent1020ee418d77874b52219c7bd5a6f52f0916a5aa
[PATCH] highres/dyntick: prevent xtime lock contention

While the !highres/!dyntick code assigns the duty of the do_timer() call to
one specific CPU, this was dropped in the highres/dyntick part during
development.

Steven Rostedt discovered the xtime lock contention on highres/dyntick due
to several CPUs trying to update jiffies.

Add the single CPU assignement back.  In the dyntick case this needs to be
handled carefully, as the CPU which has the do_timer() duty must drop the
assignement and let it be grabbed by another CPU, which is active.
Otherwise the do_timer() calls would not happen during the long sleep.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
kernel/time/tick-common.c
kernel/time/tick-internal.h
kernel/time/tick-sched.c