mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mel Gorman <mgorman@suse.de>
Cc: Abel Wu <wuyun.abel@bytedance.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Rohit Jain <rohit.k.jain@oracle.com>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: Fix misuse of available_idle_cpu()
Date: Thu, 8 Sep 2022 15:17:01 +0200	[thread overview]
Message-ID: <YxnrTdwA493gIHS8@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20220908103632.yzm5boxrr3nmvhpm@suse.de>

On Thu, Sep 08, 2022 at 11:36:32AM +0100, Mel Gorman wrote:
> On Thu, Sep 08, 2022 at 04:07:02PM +0800, Abel Wu wrote:
> > The function available_idle_cpu() was introduced to distinguish
> > between the code paths that cares if the vCPU is preempted and
> > the ones don't care. In general, available_idle_cpu() is used in
> > selecting cpus for immediate use, e.g. ttwu. While idle_cpu() is
> > used in the paths that only cares about the cpu is idle or not,
> > and __update_idle_core() is one of them.
> > 
> > Use idle_cpu() instead in the idle path to make has_idle_core
> > a better hint.
> > 
> > Fixes: 943d355d7fee (sched/core: Distinguish between idle_cpu() calls based on desired effect, introduce available_idle_cpu())
> > Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
> 
> Seems fair. As vCPU preemption is specific to virtualisation, it is very
> unlikely that SMT is exposed to the guest so the impact of the patch is

Right; only pinned guests typically expose such topology information
(anything else would be quite broken).

> minimal but I still think it's right so;

I'm not convinced; all of select_idle_sibling() seems to use
available_idle_cpu(), and that's the only consumer of
__update_idle_core(), so in that respect the current state makes sense.

  reply	other threads:[~2022-09-08 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  8:07 Abel Wu
2022-09-08 10:36 ` Mel Gorman
2022-09-08 13:17   ` Peter Zijlstra [this message]
2022-09-08 13:49     ` Abel Wu
2022-09-20  7:42       ` Abel Wu

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=YxnrTdwA493gIHS8@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=rohit.k.jain@oracle.com \
    --cc=vincent.guittot@linaro.org \
    --cc=wuyun.abel@bytedance.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

all inboxes | Powered by JetHome®