All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched: update_rq_clock() must skip ONE update
Date: Tue, 01 Apr 2014 05:10:14 +0200	[thread overview]
Message-ID: <1396321814.5324.27.camel@marge.simpson.net> (raw)
In-Reply-To: <20140331160003.GD19658@home.goodmis.org>

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@vger.kernel.org>
> > Signed-off-by: 	Mike Galbraith <umgwanakikbuti@gmail.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


  reply	other threads:[~2014-04-01  3:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30  7:24 [PATCH] sched: update_rq_clock() must skip ONE update Mike Galbraith
2014-03-31  0:12 ` Linus Torvalds
2014-03-31  4:20   ` Mike Galbraith
2014-03-31 16:00     ` Steven Rostedt
2014-04-01  3:10       ` Mike Galbraith [this message]
2014-04-01  3:26         ` Steven Rostedt
2014-03-31 16:13     ` Linus Torvalds
2014-03-31 18:27       ` Mike Galbraith
2014-03-31 18:37         ` Linus Torvalds
2014-04-01  3:28           ` Mike Galbraith
2014-04-01  9:55             ` Ingo Molnar
2014-04-03  8:02               ` Mike Galbraith
2014-04-08 15:53                 ` Peter Zijlstra
2014-04-08 16:56                   ` Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396321814.5324.27.camel@marge.simpson.net \
    --to=umgwanakikbuti@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.