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: <aYTVd2UeB9HXOrLE@gpd4>
Date: Thu, 5 Feb 2026 18:37:59 +0100
From: Andrea Righi <arighi@...dia.com>
To: Kuba Piecuch <jpiecuch@...gle.com>
Cc: Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>,
	Changwoo Min <changwoo@...lia.com>,
	Christian Loehle <christian.loehle@....com>,
	Emil Tsalapatis <emil@...alapatis.com>,
	Daniel Hodges <hodgesd@...a.com>, sched-ext@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: Invalidate dispatch decisions on CPU affinity
 changes

On Thu, Feb 05, 2026 at 05:20:11PM +0000, Kuba Piecuch wrote:
> On Wed Feb 4, 2026 at 5:56 PM UTC, Andrea Righi wrote:
> > Right. At this point I think we can just rely on the affinity validation
> > via task_can_run_on_remote_rq(), where p->cpus_ptr is always stable and
> > just drop invalid dispatches.
> >
> > And to prevent dropped tasks, I was wondering if we could just insert the
> > task into a per-rq fallback DSQ, that can be consumed from balance_scx() to
> > re-enqueue the task (setting SCX_ENQ_REENQ). This should solve the
> > re-enqueue problem avoiding the locking complexity of calling ops.enqueue()
> > directly from finish_dispatch().
> >
> > Thoughts?
> 
> How would these fallback DSQs work?
> 
> 1. Would inserting the task into the fallback DSQ trigger ops.dequeue(), so
>    that we can later balance it with the re-enqueue?

Yeah, but ... see below.

> 
> 2. Which rq's fallback DSQ will the task be inserted into? The one belonging to
>    the CPU doing the dispatch?

I was thinking the task's rq.

> 
> 3. Is the re-enqueue going to happen inside the same call to balance_one() that
>    tried to dispatch the task?

balance_one().

> 
> I'm not opposed to the idea, I'm curious to see how it works in practice.

Thinking more about this, it's a bit problematic, when
set_cpus_allowed_scx() triggers dequeue+enqueue we get another enqueue
without the SCX_ENQ_REENQ flag and it's a bit tricky to manage that with
the fallback DSQ.

So, I'm back to the drawing board, trying to explore the qseq approach...

-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ