The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Hang Zhengyang <hang.zhengyang1010@gmail.com>
Cc: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>,
	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>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Shuah Khan <shuah@kernel.org>, Kuba Piecuch <jpiecuch@google.com>,
	Jonathan Bastari Thamrin <thamrinjonathan@gmail.com>,
	Hui Su <sh_def@163.com>,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-7.5 1/2] sched_ext: idle: Don't stack a sync wakee behind a higher-class task
Date: Fri, 4 Dec 2026 16:54:22 +0100	[thread overview]
Message-ID: <axLiLhjAB9KwpVjp@gpd4> (raw)
In-Reply-To: <20261204122324.579433-1-hang.zhengyang1010@gmail.com>

Hi Hang,

On Fri, Dec 04, 2026 at 12:23:24PM +0000, Hang Zhengyang wrote:
> Hi Andrea,
> 
> Thanks for the review. I agree that this doesn't fix the root cause,
> but I looked at the callers and couldn't find a better fix that would
> work upstream. pipe_write() and sock_def_readable() use a sync wakeup on
> purpose, so that the reader runs soon, and at that point they can't
> know whether the writer keeps running. fair copes with this:
> select_idle_sibling() moves the wakee to an idle CPU when the waker's
> CPU is busy. The ext shortcut picks the waker's CPU even while other
> CPUs are idle, so behind an RT or DL waker, the wakee can wait for the
> dl_server for up to about a second.
> 
> If you have a solution in mind, or can share the direction, I'm happy
> to implement it. Or I can drop the patch if you prefer to keep it as it
> is.

I think it makes sense to drop the patch for now. A possible direction
to address the issue would require auditing the sync wakeup users in the
kernel and ensuring that they honor the contract. Which is probably
doable, but on the scx side, I think we should leave the default
behavior as it is.

BPF schedulers that need custom sync wakeup handling can clear
SCX_WAKE_SYNC in ops.select_cpu() before calling scx_select_cpu_dfl(),
then apply their own policy. Or they can ignore the helper entirely and
implement their own idle CPU selection. Ultimately, scx_select_cpu_dfl()
is just a built-in default and BPF schedulers are free to replace it
with their own logic.

Thanks,
-Andrea

  reply	other threads:[~2026-12-04 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  8:44 [PATCH sched_ext/for-7.5 0/2] sched_ext: idle: Don't stack a sync wakee behind a higher-class task Hang Zhengyang via B4 Relay
2026-11-20  8:44 ` [PATCH sched_ext/for-7.5 1/2] " Hang Zhengyang via B4 Relay
2026-12-04  6:59   ` Andrea Righi
2026-12-04 12:23     ` Hang Zhengyang
2026-12-04 15:54       ` Andrea Righi [this message]
2026-12-04 16:15         ` Hang Zhengyang
2026-11-20  8:44 ` [PATCH sched_ext/for-7.5 2/2] selftests/sched_ext: Test sync wakeups from an RT task Hang Zhengyang via B4 Relay
2026-12-04  5:22 ` [PATCH sched_ext/for-7.5 0/2] sched_ext: idle: Don't stack a sync wakee behind a higher-class task Hang Zhengyang

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=axLiLhjAB9KwpVjp@gpd4 \
    --to=arighi@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=bsegall@google.com \
    --cc=changwoo@igalia.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hang.zhengyang1010@gmail.com \
    --cc=jpiecuch@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sched-ext@lists.linux.dev \
    --cc=sh_def@163.com \
    --cc=shuah@kernel.org \
    --cc=thamrinjonathan@gmail.com \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=void@manifault.com \
    --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