Re: [PATCH 18/32] nohz/cpuset: Don't stop the tick if posix cpu timers are running

Peter Zijlstra
2011-08-29T16:00:18Z

On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> If either a per thread or a per process posix cpu timer is running,
> don't stop the tick.
>
> TODO: restart the tick if it is stopped and a posix cpu timer is
> enqueued. Check we probably need a memory barrier for the per
> process posix timer that can be enqueued from another task
> of the group.

it would

> +++ b/kernel/sched.c
> @@ -71,6 +71,7 @@
> #include <linux/ctype.h>
> #include <linux/ftrace.h>
> #include <linux/slab.h>
> +#include <linux/posix-timers.h>
>
> #include <asm/tlb.h>
> #include <asm/irq_regs.h>
> @@ -2491,6 +2492,9 @@ bool cpuset_nohz_can_stop_tick(void)
> if (rcu_pending(cpu))
> return false;
>
> + if (posix_cpu_timers_running(current))
> + return false;
> +
> return true;
> }

Doesn't belong here, go poke at tick_nohz_can_stop_tick().