mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shubhang <sh@gentwo.org>
To: Christian Loehle <christian.loehle@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	 Juri Lelli <juri.lelli@redhat.com>,
	 Vincent Guittot <vincent.guittot@linaro.org>,
	 Dietmar Eggemann <dietmar.eggemann@arm.com>,
	 Steven Rostedt <rostedt@goodmis.org>,
	 Valentin Schneider <vschneid@redhat.com>,
	 K Prateek Nayak <kprateek.nayak@amd.com>,
	 Beata Michalska <beata.michalska@arm.com>,
	Elif Topuz <elif.topuz@arm.com>,
	 "Rafael J . Wysocki" <rafael@kernel.org>,
	 Daniel Lezcano <daniel.lezcano@kernel.org>,
	 Christoph Lameter <cl@gentwo.org>,
	linux-kernel@vger.kernel.org,  linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/2] sched/fair: Randomize equally shallow slow-path candidates
Date: Wed, 16 Sep 2026 12:43:15 -0700 (PDT)	[thread overview]
Message-ID: <08339e62-1787-e203-569c-a7fd3026395f@gentwo.org> (raw)
In-Reply-To: <20260916100116.701206-3-christian.loehle@arm.com>

Hi Christian,

On Wed, 16 Sep 2026, Christian Loehle wrote:

> +			} else if (!idle || idle->exit_latency == min_exit_latency) {
> +				nr_candidates++;
> +				if (nr_candidates == 1 ||
> +				    !reciprocal_scale(sched_rng(), nr_candidates))
> +					shallowest_idle_cpu = i;

available_idle_cpu(i) ensures that this is an idle CPU, but !idle 
means that no active cpuidle state, meaning no exit latency is 
available for comparison.

[PATCH 1/2] treats such a CPU as a fallback i.e. it is selected only when 
no idle candidate has been found yet. Here it becomes an equal reservoir 
candidate, even after selecting a CPU with the minimum known exit latency. 
That is, it is added to the random selection pool and can replace 
shallowest_idle_cpu.

Is that intentional ? If not, should reservoir sampling be limited to
candidates with `idle->exit_latency == min_exit_latency`, while 
retaining the first !idle CPU only as the fallback?

Regards,
Shubhang Kaushik

  parent reply	other threads:[~2026-09-16 19:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 10:01 [PATCH 0/2] sched/fair: Randomize equally shallow idle CPU picks Christian Loehle
2026-09-16 10:01 ` [PATCH 1/2] sched/fair: Drop idle recency from slow-path CPU selection Christian Loehle
2026-09-17 13:28   ` Vincent Guittot
2026-09-16 10:01 ` [PATCH 2/2] sched/fair: Randomize equally shallow slow-path candidates Christian Loehle
2026-09-16 11:06   ` Kayra Cizmeci
2026-09-16 11:10     ` Christian Loehle
2026-09-16 11:12   ` Christian Loehle
2026-09-16 11:46     ` Kayra Cizmeci
2026-09-16 19:43   ` Shubhang [this message]
2026-09-17  7:47     ` Christian Loehle
2026-09-17  9:58       ` Christian Loehle
2026-09-17 14:02         ` Vincent Guittot
2026-09-17 14:16         ` Kayra Cizmeci
2026-09-17 14:08   ` Vincent Guittot
2026-09-17 14:22     ` Christian Loehle
2026-09-17 15:08       ` Vincent Guittot
2026-09-17 15:17         ` Christian Loehle
2026-09-24 12:44 ` [PATCH 0/2] sched/fair: Randomize equally shallow idle CPU picks Muhammad Usama Anjum

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=08339e62-1787-e203-569c-a7fd3026395f@gentwo.org \
    --to=sh@gentwo.org \
    --cc=beata.michalska@arm.com \
    --cc=christian.loehle@arm.com \
    --cc=cl@gentwo.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=elif.topuz@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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®