aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-04-21 14:28:38 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2013-04-22 13:59:25 -0400
commit6ac29178b4fe8e7c0139375008f014ceb466039d (patch)
tree2887dc446038e529d9e168555c9328655f43fb5b /kernel
parenta166fcf04d848ffa09f0e831805553089f190cf4 (diff)
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 <fweisbec@gmail.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Christoph Lameter <cl@linux.com> Cc: Geoff Levand <geoff@infradead.org> Cc: Gilad Ben Yossef <gilad@benyossef.com> Cc: Hakan Akkan <hakanakkan@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kevin Hilman <khilman@linaro.org> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/posix-cpu-timers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 84d5cb372ed5..42670e9b44e0 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)
673bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk) 673bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk)
674{ 674{
675 if (!task_cputime_zero(&tsk->cputime_expires)) 675 if (!task_cputime_zero(&tsk->cputime_expires))
676 return true; 676 return false;
677 677
678 if (tsk->signal->cputimer.running) 678 if (tsk->signal->cputimer.running)
679 return true; 679 return false;
680 680
681 return false; 681 return true;
682} 682}
683#else 683#else
684static inline void posix_cpu_timer_kick_nohz(void) { } 684static inline void posix_cpu_timer_kick_nohz(void) { }