Re: [PATCH v2 sched_ext/for-7.1] sched_ext: Invalidate dispatch decisions on CPU affinity changes

Tejun Heo
2026-05-05T15:14:49Z

Hello,

On Tue, May 05, 2026 at 09:13:57AM +0000, Kuba Piecuch wrote:
> Ah, interesting, I didn't know there's a pure-BPF implementation of spinlocks!
> I haven't really had the chance to play around with arenas yet, looks like I'm
> missing out ;-)

Yeah, I'm pretty excited about it. If you have a moment, take a look at the
qmap code in the following RFC branch:

https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git/tree/tools/sched_ext/scx_qmap.bpf.c?h=cid-arena-rfc

- Native FIFO data structure in arena. (SCX repo already has atq and other
usages but this is a simplistic example)

- qmap_set_cmask() (the RFC part) shows kernel <-> BPF communication through
arena memory where kernel directly writes to arena and pass the arena
pointer to ops.set_cmask().

Thanks.

--
tejun