mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ben Segall <bsegall@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	pjt@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Fix potential near-infinite distribute_cfs_runtime loop
Date: Mon, 23 Jun 2014 08:46:25 +0200	[thread overview]
Message-ID: <20140623064625.GC19860@laptop.programming.kicks-ass.net> (raw)
In-Reply-To: <20140620222120.13814.21652.stgit@sword-of-the-dawn.mtv.corp.google.com>

On Fri, Jun 20, 2014 at 03:21:20PM -0700, Ben Segall wrote:
> distribute_cfs_runtime intentionally only hands out enough runtime to
> bring each cfs_rq to 1 ns of runtime, expecting the cfs_rqs to then take
> the runtime they need only once they actually get to run. However, if
> they get to run sufficiently quickly, the period timer is still in
> distribute_cfs_runtime and no runtime is available, causing them to
> throttle. Then distribute has to handle them again, and this can go on
> until distribute has handed out all of the runtime 1ns at a time, which
> takes far too long.
> 
> Instead allow access to the same runtime that distribute is handing out,
> accepting that corner cases with very low quota may be able to spend the
> entire cfs_b->runtime during distribute_cfs_runtime, meaning that the
> runtime directly handed out by distribute_cfs_runtime was over quota. In
> addition, if a cfs_rq does manage to throttle like this, make sure the
> existing distribute_cfs_runtime no longer loops over it again.
> 
> Signed-off-by: Ben Segall <bsegall@google.com>

Thanks Ben!

  reply	other threads:[~2014-06-23  6:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 22:21 Ben Segall
2014-06-23  6:46 ` Peter Zijlstra [this message]
2014-07-05 10:43 ` [tip:sched/core] sched: Fix potential near-infinite distribute_cfs_runtime() loop tip-bot for Ben Segall

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=20140623064625.GC19860@laptop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pjt@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome