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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQD4RdAEpBSeI7nQ@slm.duckdns.org>
Date: Tue, 28 Oct 2025 07:07:17 -1000
From: Tejun Heo <tj@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: David Vernet <void@...ifault.com>,
	Andrea Righi <andrea.righi@...ux.dev>,
	Changwoo Min <changwoo@...lia.com>, linux-kernel@...r.kernel.org,
	sched-ext@...ts.linux.dev, Wen-Fang Liu <liuwenfang@...or.com>
Subject: Re: [PATCH 3/3] sched_ext: Allow scx_bpf_reenqueue_local() to be
 called from anywhere

Hello, Peter.

On Tue, Oct 28, 2025 at 12:01:53PM +0100, Peter Zijlstra wrote:
> On Mon, Oct 27, 2025 at 08:17:38AM -1000, Tejun Heo wrote:
> > Hello,
> > 
> > On Mon, Oct 27, 2025 at 07:10:28PM +0100, Peter Zijlstra wrote:
> > ...
> > > Just for my elucidation and such.. This is when ttwu() happens and the
> > > CPU is idle and you dispatch directly to it, expecting it to then go run
> > > that task. After which another wakeup/balance movement happens which
> > > places/moves a task from a higher priority class to that CPU, such that
> > > your initial (ext) task doesn't get to run after all. Right?
> > 
> > Yes, that's the scenario that I was thinking.
> 
> So I've been pondering this a bit, and came up with the below. I'm not
> quite happy with it, I meant to share that new queue_mask variable, but
> this came out.

Yeah, something like this that creates global state tracking from wakeup to
dispatch would work. However, from sched_ext POV, I think TP route probably
is a better route at least for now. Once reenqueue_local is allowed from
anywhere, which is useful no matter what, there just aren't good reasons to
maintain ops.cpu_acuire/release(). It doesn't allow anything more or make
things noticeably more performant or easier. It's always nice to be able to
reduce API surface after all.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ