All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched: update_rq_clock() must skip ONE update
Date: Thu, 03 Apr 2014 10:02:18 +0200	[thread overview]
Message-ID: <1396512138.5404.32.camel@marge.simpson.net> (raw)
In-Reply-To: <20140401095548.GB1299@gmail.com>

On Tue, 2014-04-01 at 11:55 +0200, Ingo Molnar wrote: 
> * Mike Galbraith <umgwanakikbuti@gmail.com> wrote:
> 
> > On Mon, 2014-03-31 at 11:37 -0700, Linus Torvalds wrote: 
> > > On Mon, Mar 31, 2014 at 11:27 AM, Mike Galbraith
> > > <umgwanakikbuti@gmail.com> wrote:
> > > >
> > > > Oh, I didn't cc you because I wanted it applied instantly as ultra
> > > > critical, only because the chain of events might be of interest.
> > > 
> > > Ok. That was my main worry, since I was in the process or releasing
> > > 3.14, and I just couldn't tell if the patch was something I should
> > > worry about or not.
> > > 
> > > And it seems that not applying it was the right thing, which is all
> > > that matters by now.
> > 
> > Yes.  Jocular red flag was to Peter and Ingo.  I don't try to bypass 
> > them, that would be plain rude.  I've been known to help maintainers 
> > a little, but I don't ever try to call the shots.  They do that 
> > well.
> 
> Btw., in general feel free to Cc: Linus if a fix looks truly urgent, 
> as neither Peter nor me might be around on a weekend, shortly before a 
> release.

Still not urgent, but now verified to have fixed the large IO beast boot
problem.  'course that implies that disk discovery may generate truly
magnificent wakeup latency.. for the throttle to helpfully double.

---cut here---

Prevent large wakeup latencies from being accounted to the wrong task.

Cc: <stable@vger.kernel.org>
Signed-off-by: 	Mike Galbraith <umgwanakikbuti@gmail.com>
---
 kernel/sched/core.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -118,7 +118,12 @@ void update_rq_clock(struct rq *rq)
 {
 	s64 delta;
 
-	if (rq->skip_clock_update > 0)
+	/*
+	 * Set during wakeup to indicate we are on the way to schedule().
+	 * Decrement to ensure that a very large latency is not accounted
+	 * to the wrong task.
+	 */
+	if (rq->skip_clock_update-- > 0)
 		return;
 
 	delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;



  reply	other threads:[~2014-04-03  8:02 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
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 [this message]
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=1396512138.5404.32.camel@marge.simpson.net \
    --to=umgwanakikbuti@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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.