Commit 6ac29178 authored by Frederic Weisbecker's avatar Frederic Weisbecker

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: default avatarFrederic 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>
parent a166fcf0
...@@ -673,12 +673,12 @@ static void posix_cpu_timer_kick_nohz(void) ...@@ -673,12 +673,12 @@ static void posix_cpu_timer_kick_nohz(void)
bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk) bool posix_cpu_timers_can_stop_tick(struct task_struct *tsk)
{ {
if (!task_cputime_zero(&tsk->cputime_expires)) if (!task_cputime_zero(&tsk->cputime_expires))
return true; return false;
if (tsk->signal->cputimer.running) if (tsk->signal->cputimer.running)
return true;
return false; return false;
return true;
} }
#else #else
static inline void posix_cpu_timer_kick_nohz(void) { } static inline void posix_cpu_timer_kick_nohz(void) { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment