lkml.org 
[lkml]   [2012]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] specific do_timer_cpu value for nohz off mode
From
Date
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



\
 
 \ /
  Last update: 2012-01-15 15:25    [W:0.116 / U:1.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site