From: Frederic Weisbecker Date: Sun, 21 Apr 2013 18:28:38 +0000 (+0200) Subject: posix_timers: Fix pre-condition to stop the tick on full dynticks X-Git-Tag: v3.12-rc1~897^2~10^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ac29178b4fe8e7c0139375008f014ceb466039d;p=kernel%2Fkernel-generic.git posix_timers: Fix pre-condition to stop the tick on full dynticks The test that checks if a CPU can stop its tick from posix CPU timers angle was mistakenly inverted. What we want is to prevent the tick from being stopped as long as the current CPU's task runs a posix CPU timer. Fix this. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Oleg Nesterov Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner --- diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 84d5cb3..42670e9 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -673,12 +673,12 @@ static void posix_cpu_timer_kick_nohz(void) bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk) { if (!task_cputime_zero(&tsk->cputime_expires)) - return true; + return false; if (tsk->signal->cputimer.running) - return true; + return false; - return false; + return true; } #else static inline void posix_cpu_timer_kick_nohz(void) { }