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]
Date:	Tue, 01 Apr 2014 05:10:14 +0200
From:	Mike Galbraith <umgwanakikbuti@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: update_rq_clock() must skip ONE update

On Mon, 2014-03-31 at 12:00 -0400, Steven Rostedt wrote: 
> On Mon, Mar 31, 2014 at 06:20:36AM +0200, Mike Galbraith wrote:
> > 
> > Cc: <stable@...r.kernel.org>
> > Signed-off-by: 	Mike Galbraith <umgwanakikbuti@...il.com>
> > ---
> >  kernel/sched/core.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -118,7 +118,7 @@ void update_rq_clock(struct rq *rq)
> >  {
> >  	s64 delta;
> >  
> 
> Mike,
> 
> If I understand this code correctly, skip_clock_update gets set to one,
> where it should skip the next call to update_rq_clock(), but only the
> next skip_clock_update(), and after that, it should resume calling it again.
> Is that correct?

Yeah, it's supposed to prevent us from doing back to back fastpath
update + math for no good reason.  Actually, decrement isn't perfect,
simple set/clear is.. iff we are really headed to schedule() RSN.  Tick
time clear would bound error too.

Maybe it should just die as more potential trouble than it's worth.  It
has saved a pile of fastpath cycles, losing those again would be a
shame.  Accounting doesn't need to be perfect (is the enemy of good),
but it does need to be a guaranteed good.

-Mike

--
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