[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200130085513.GH3466@techsingularity.net>
Date: Thu, 30 Jan 2020 08:55:13 +0000
From: Mel Gorman <mgorman@...hsingularity.net>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Dave Chinner <david@...morbit.com>, Ingo Molnar <mingo@...hat.com>,
Tejun Heo <tj@...nel.org>, Phil Auld <pauld@...hat.com>,
Ming Lei <ming.lei@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
linux-fsdevel@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched, fair: Allow a per-cpu kthread waking a task to
stack on the same CPU
On Thu, Jan 30, 2020 at 09:06:53AM +0100, Peter Zijlstra wrote:
> On Thu, Jan 30, 2020 at 12:43:34AM +0000, Mel Gorman wrote:
> > On Wed, Jan 29, 2020 at 06:38:52PM +0100, Peter Zijlstra wrote:
>
> > > I suppose the fact that it limits it to tasks that were running on the
> > > same CPU limits the impact if we do get it wrong.
> > >
> >
> > And it's limited to no other task currently running on the
> > CPU. Now, potentially multiple sleepers are on that CPU waiting for
> > a mutex/rwsem/completion but it's very unlikely and mostly likely due
> > to the machine being saturated in which case searching for an idle CPU
> > will probably fail. It would also be bound by a small window after the
> > first wakeup before the task becomes runnable before the nr_running check
> > mitigages the problem. Besides, if the sleeping task is waiting on the
> > lock, it *is* related to the kworker which is probably finished.
> >
> > In other words, even this patches worst-case behaviour does not seem
> > that bad.
>
> OK; let's just stick it in and see what, if anything, falls over :-)
>
> I saw there is a v2 out (although I didn't see what changed in a hurry),
> let me queue that one.
Only the changelog and comments changed in light of the discussion
with Dave.
--
Mel Gorman
SUSE Labs
Powered by blists - more mailing lists