lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110830151042.GU9748@somewhere.redhat.com>
Date:	Tue, 30 Aug 2011 17:10:45 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Anton Blanchard <anton@....ibm.com>,
	Avi Kivity <avi@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
	Paul Menage <menage@...gle.com>,
	Stephen Hemminger <shemminger@...tta.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Tim Pepper <lnxninja@...ux.vnet.ibm.com>
Subject: Re: [PATCH 19/32] nohz/cpuset: Restart tick when nohz flag is
 cleared on cpuset

On Mon, Aug 29, 2011 at 06:02:01PM +0200, Peter Zijlstra wrote:
> On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> > +++ b/kernel/cpuset.c
> > @@ -1199,6 +1199,14 @@ static void cpuset_change_flag(struct task_struct *tsk,
> >  
> >  DEFINE_PER_CPU(int, cpu_adaptive_nohz_ref);
> >  
> > +static void cpu_exit_nohz(int cpu)
> > +{
> > +       preempt_disable();
> > +       smp_call_function_single(cpu, cpuset_exit_nohz_interrupt,
> > +                                NULL, true);
> > +       preempt_enable();
> > +}
> > +
> >  static void update_nohz_cpus(struct cpuset *old_cs, struct cpuset *cs)
> >  {
> >         int cpu;
> > @@ -1212,6 +1220,19 @@ static void update_nohz_cpus(struct cpuset *old_cs, struct cpuset *cs)
> >                         per_cpu(cpu_adaptive_nohz_ref, cpu) += 1;
> >                 else
> >                         per_cpu(cpu_adaptive_nohz_ref, cpu) -= 1;
> > +
> > +               val = per_cpu(cpu_adaptive_nohz_ref, cpu);
> > +
> > +               if (!val) {
> > +                       /*
> > +                        * The update to cpu_adaptive_nohz_ref must be
> > +                        * visible right away. So that once we restart the tick
> > +                        * from the IPI, it won't be stopped again due to cache
> > +                        * update lag.
> > +                        */
> > +                       smp_mb();
> > +                       cpu_exit_nohz(cpu);
> > +               }
> >         }
> >  }
> >  #else
> > diff --git a/kernel/sched.c b/kernel/sched.c
> > index 78ea0a5..75378be 100644
> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -2513,6 +2513,14 @@ void cpuset_update_nohz(void)
> >                 cpuset_nohz_restart_tick();
> >  }
> >  
> > +void cpuset_exit_nohz_interrupt(void *unused)
> > +{
> > +       if (!tick_nohz_adaptive_mode())
> > +               return;
> > +
> > +       cpuset_nohz_restart_tick();
> > +} 
> 
> You do this just to annoy me, right? Why doesn't it live in cpuset.c
> where you use it?


Right, I'll move all those things and fix the naming / namespace.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ