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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340099851.21745.35.camel@twins>
Date:	Tue, 19 Jun 2012 11:57:31 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Charles Wang <muming.wq@...il.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Tao Ma <tm@....ma>,
	含黛 <handai.szj@...bao.com>,
	Doug Smythies <dsmythies@...us.net>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] sched: Folding nohz load accounting more accurate

On Tue, 2012-06-19 at 14:24 +0800, Charles Wang wrote:
> > +static inline int calc_load_write_idx(void)
> >  {
> > +     int idx = calc_load_idx;
> > +
> > +     /*
> > +      * See calc_global_nohz(), if we observe the new index, we also
> > +      * need to observe the new update time.
> > +      */
> > +     smp_rmb();
> > +
> > +     /*
> > +      * If the folding window started, make sure we start writing in the
> > +      * next idle-load delta.
> > +      */
> > +     if (!time_before(jiffies, calc_load_update))
> > +             idx++;
> 
> Can we just take calc_load_update as the start time-line here?  Will
> there be different ticks between cpus? 

I'm not exactly sure what you're asking, but yes and probably yes.

The per-cpu ticks are separate, but on the same time-line. That is, they
don't happen at the exact same moment, either due to per-cpu IRQ
disabling or because the architecture spreads the tick. But they do all
get HZ ticks per second.

Remember, jiffies is a global timeline, and the global calc_load_update
is the last to be moved fwd to the next period, so its ideally suited to
be used to determine the current window.
--
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