lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DEJEVK0YKMWY.116BVU5P5G91L@google.com>
Date: Thu, 27 Nov 2025 10:39:35 +0000
From: Kuba Piecuch <jpiecuch@...gle.com>
To: Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>, 
	Andrea Righi <andrea.righi@...ux.dev>, Changwoo Min <changwoo@...lia.com>
Cc: <linux-kernel@...r.kernel.org>, <sched-ext@...ts.linux.dev>, 
	Peter Zijlstra <peterz@...radead.org>, Wen-Fang Liu <liuwenfang@...or.com>
Subject: Re: [PATCH v3 3/3] sched_ext: Allow scx_bpf_reenqueue_local() to be
 called from anywhere

On Wed Oct 29, 2025 at 3:49 PM UTC, Tejun Heo wrote:
> Schedulers can now use standard BPF mechanisms like the sched_switch tracepoint
> to detect and handle CPU preemption.

Correct me if I'm wrong, but I think using the sched_switch tracepoint still
leaves us with no preemption notification in the following scenario:

1. An RT task is running on the CPU and blocks.

2. pick_task_scx() briefly drops the rq lock in balance_one() and the RT task
   is woken up.

3. SCX sees the enqueue and returns RETRY_TASK from pick_task_scx().

4. The RT task is picked.

5. Since prev == next, we don't enter the is_switch branch in __schedule()
   and the sched_switch tracepoint isn't reached.

The BPF scheduler could hook into trace_sched_exit_tp() to work around this,
but that tracepoint seems to be for testing and debugging purposes only.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ