Messages in this thread | | | Subject | Re: [PATCH] specific do_timer_cpu value for nohz off mode | From | Mike Galbraith <> | Date | Sun, 15 Jan 2012 15:23:18 +0100 |
| |
On Sun, 2012-01-15 at 14:46 +0100, Mike Galbraith wrote: > On Tue, 2011-11-08 at 13:11 -0600, Dimitri Sivanich wrote: > > Resending this. > > > > > > Allow manual override of the tick_do_timer_cpu. > > Bigger button below.
> +/* Called with cgroup_mutex held */ > +void cpuset_flags_set(int cpu, unsigned bits) > +{ > + struct rq *rq = cpu_rq(cpu); > + unsigned long flags; > + int nr; > + > + raw_spin_lock_irqsave(&rq->lock, flags); > + /* Set blocker flags before taking any action */ > + rq->cpuset_flags |= bits; > + for (nr = 0; bits; nr++) { > + if (!(bits & (1 << nr))) > + continue; > + switch (nr) { > + case RQ_TICK: > + break; > + case RQ_HPC: > + /* Ensure that jiffies doesn't go stale */ > + if (!nr_hpc_cpus++) { > + tick_do_timer_cpu = 0; > + /* safe, CPU0 is modifier excluded */ > + cpuset_flags_set(0, 1 << RQ_TICK); > + wake_up_idle_cpu(0);
Just in case someone was going to mention it, I'd already moved that wakeup_idle_cpu() to RQ_TICK case, but the darn thing crawled back.
-Mike
| |