[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181022220935.GD3109@worktop.c.hoisthospitality.com>
Date: Tue, 23 Oct 2018 00:09:35 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Sistare <steven.sistare@...cle.com>
Cc: mingo@...hat.com, subhra.mazumdar@...cle.com,
dhaval.giani@...cle.com, daniel.m.jordan@...cle.com,
pavel.tatashin@...rosoft.com, matt@...eblueprint.co.uk,
umgwanakikbuti@...il.com, riel@...hat.com, jbacik@...com,
juri.lelli@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/10] steal tasks to improve CPU utilization
On Mon, Oct 22, 2018 at 03:07:10PM -0400, Steven Sistare wrote:
> On 10/22/2018 1:04 PM, Peter Zijlstra wrote:
> > On Mon, Oct 22, 2018 at 07:59:31AM -0700, Steve Sistare wrote:
> >> When a CPU has no more CFS tasks to run, and idle_balance() fails to
> >> find a task, then attempt to steal a task from an overloaded CPU in the
> >> same LLC. Maintain and use a bitmap of overloaded CPUs to efficiently
> >> identify candidates. To minimize search time, steal the first migratable
> >> task that is found when the bitmap is traversed. For fairness, search
> >> for migratable tasks on an overloaded CPU in order of next to run.
> >>
> >> This simple stealing yields a higher CPU utilization than idle_balance()
> >> alone, because the search is cheap, so it may be called every time the CPU
> >> is about to go idle. idle_balance() does more work because it searches
> >> widely for the busiest queue, so to limit its CPU consumption, it declines
> >> to search if the system is too busy. Simple stealing does not offload the
> >> globally busiest queue, but it is much better than running nothing at all.
> >
> > Why I don't dislike the idea; I feel it is unfortunate to have two
> > different mechanisms to do effectively the same thing.
> >
> > Can't we improve idle_balance() instead of building this parallel
> > functionality?
>
> We could delete idle_balance() and use stealing exclusively for handling
> new idle. For each sd level, stealing would look for an overloaded CPU
> in the overloaded bitmap(s) that overlap that level. I played with that
> a little but it is not ready for prime time, and I did not want to hold
> the patch series for it. Also, I would like folks to get some production
> experience with stealing on a variety of architectures before considering
> a radical step like replacing idle_balance().
Fair enough. And yes, it might make sense to fully replace the current
newidle balance with something along these lines.
> We could remove the core and socket levels from idle_balance() and let
> stealing handle those levels. I think that makes sense after stealing
> performance is validated on more architectures, but we would still have
> two different mechanisms.
Yes, this would be a fairly simple change and make sense until we have a
full replacement.
> We could merge the stealing code into the idle_balance() code to get a
> union of the two, but IMO that would be less readable.
Agreed; I don't think that'll be pretty.
Powered by blists - more mailing lists