<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in sub.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>11260c335ec6071af5543aef73000b28f041c124 - Merge tag &apos;sched_ext-for-7.3&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#11260c335ec6071af5543aef73000b28f041c124</link>
        <description>Merge tag &apos;sched_ext-for-7.3&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_extPull sched_ext updates from Tejun Heo: &quot;Most of this cycle completes the enqueue-path support for hierarchical  sub-scheduling, which makes sub-scheduler support feature complete: a  root BPF scheduler can now hand a cgroup subtree over to a nested  sub-scheduler together with revocable CPU grants, and the  sub-scheduler owns all scheduling decisions for its tasks on those  CPUs.  Development volume was high and a number of changes plugging holes in  the new support landed late in the cycle. Also included are core  scheduling fixes that were completed too late for the v7.2 release and  are routed through this pull request.  Sub-scheduler CPU delegation:   - Parent schedulers now grant and revoke per-CPU capabilities     (enqueueing, preemption, CPU frequency control) on their children,     enforced on every path a scheduler can reach a CPU through.     Previously only dispatching could be delegated; this lets     sub-schedulers fully schedule their CPUs.   - Rescue execution: a task whose scheduler doesn&apos;t have access to the     CPUs the task needs to run on starved until the watchdog ejected     the whole scheduler. The kernel now runs such tasks directly on a     small bandwidth budget, turning a scheduler-killing failure into     bounded degradation.   - Cgroup integration: tasks migrating across a sub-scheduler boundary     weren&apos;t re-homed to the new owner, causing wrong-scheduler     scheduling and a use-after-free. Sub-schedulers now take over their     cgroup subtree and receive its cgroup callbacks.   - Arena objects now cross the kernel/BPF boundary as typed pointer     arguments, translated transparently by the BPF tree&apos;s new arena     argument support, replacing untyped arguments with manual     translation.   - scx_qmap now demonstrates full hierarchical sub-scheduling.  Other fixes and updates:   - Robustness improvements: the abort path is now NMI-safe, fixing     deadlocks when errors are raised from NMI context and making     hardlockup recovery direct. Reenqueue loops that could monopolize a     CPU ahead of the watchdog now eject the offending scheduler, and     stalls are blamed on the scheduler actually responsible.   - Hardening: BPF-writable arena memory is validated before kernel     use, and task slice and vtime writes got explicit synchronization     rules, closing corruption vectors open to buggy or malicious     schedulers.   - Core scheduling: sched_ext dispatching can drop the rq lock inside     the core-wide pick, which let interleaving selections corrupt each     other&apos;s state and hard-hang the machine. The selection now restarts     when the lock was released. The task ordering callback was also     invoked with its arguments swapped, and the default ordering is     updated to work across sub-scheduler boundaries. The fixes are     marked for stable.   - Other fixes headed for stable: a task init leak on fork failure     during enable, tooling compat macros that silently failed to detect     newer kernels, and a crash on reenqueueing against a destroyed     dispatch queue.   - Tooling: scx_pair moves off deprecated callbacks, and the     deprecated scx_bpf_cpu_rq() kfunc is removed&quot;* tag &apos;sched_ext-for-7.3&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: (144 commits)  sched_ext: Drop the dead SCX_DEQ_CORE_SCHED_EXEC test in dequeue_task_scx()  sched_ext: Make core-sched task ordering hierarchy-aware  sched_ext: Use runnable_at for the default core-sched task ordering  sched_ext: Fix inverted ops.core_sched_before() invocation  sched_ext: Move the config-off sub-cap kfunc stubs into sub.c  sched_ext: Rename balance-era identifiers to dispatch terms  sched_ext: Drop the stale keep_prev fixup in dispatch_pick()  sched_ext: Keep kick_sync waiting on the rq&apos;s own CPU  sched_ext: Make SCHED_CLASS_EXT select GENERIC_ALLOCATOR  sched_ext/scx_flatcg: Fix cvtime true-up on slice expiry  sched_ext: Don&apos;t BUG_ON a destroyed DSQ in process_deferred_reenq_users  sched_ext: Fix scx_bpf_dsq_move_to_local___v2 compat detection  sched_ext: Make scx_bpf_events() read the calling scheduler&apos;s counters  sched_ext: Drop unlocked scx_rq_clock_invalidate() from scx_root_disable()  selftests/sched_ext: Fix flaky ddsp failure tests on busy systems  selftests/sched_ext: Make numa idle validation race-free  sched_ext: Fix scx_bpf_dsq_reenq___compat kfunc extern prototype  sched_ext/scx_flatcg: expire cached hweights on weight changes  sched_ext: Fix exit_task leak on fork failure during enable  sched_ext: fix stale references in doc comments  ...

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Thu, 20 Aug 2026 20:01:37 +0200</pubDate>
        <dc:creator>Linus Torvalds &lt;torvalds@linux-foundation.org&gt;</dc:creator>
    </item>
<item>
        <title>fab183d632628381b466a41479489541ac0e29a0 - sched_ext: Merge branch &apos;for-7.3-arena-args&apos; into for-7.3</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#fab183d632628381b466a41479489541ac0e29a0</link>
        <description>sched_ext: Merge branch &apos;for-7.3-arena-args&apos; into for-7.3Pull to receive the __arena argument conversion: 67f1f4a48c24 (&quot;sched_ext: Pass kernel arena pointers to ops_cid callbacks&quot;) a8dc810968af (&quot;sched_ext: Convert sub-cap kfuncs to __arena cmask arguments&quot;) a05c5b5cb5cf (&quot;sched_ext: Convert scx_bpf_cid_override() to __arena array arguments&quot;)along with the bpf-next branch carrying the __arena argument support theydepend on.Conflict in kernel/sched/ext/ext.c between: c384ab8a0b13 (&quot;sched_ext: Move the config-off sub-cap kfunc stubs into sub.c&quot;)and: a8dc810968af (&quot;sched_ext: Convert sub-cap kfuncs to __arena cmask arguments&quot;)which updated the stubs in their old ext.c location. Resolved by keepingext.c without the stubs and applying the prototype conversion to therelocated stubs in sub.c.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 17 Aug 2026 23:20:34 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>c384ab8a0b13741982669790a36a152acb2ede82 - sched_ext: Move the config-off sub-cap kfunc stubs into sub.c</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#c384ab8a0b13741982669790a36a152acb2ede82</link>
        <description>sched_ext: Move the config-off sub-cap kfunc stubs into sub.cThe EOPNOTSUPP stubs for the sub-cap kfuncs live in ext.c under #ifndefCONFIG_EXT_SUB_SCHED while the real definitions live in sub.c. Move thestubs into sub.c so all sub kfunc definitions live in one file. Pure codemove, no functional change.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Sun, 16 Aug 2026 02:06:50 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>3167bd3e0c22b1821df9987b9f4509e147cdad1f - sched_ext: Rename balance-era identifiers to dispatch terms</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#3167bd3e0c22b1821df9987b9f4509e147cdad1f</link>
        <description>sched_ext: Rename balance-era identifiers to dispatch termssched_class-&gt;balance() is gone from sched_ext and what balance_one() does isrun dispatch to produce something pickable. Update the balance-era names todispatch terms:- balance_one() -&gt; dispatch_one()- SCX_RQ_IN_BALANCE -&gt; SCX_RQ_IN_DISPATCHNo BPF scheduler reads the flag. The enum autogen headers gain the new namewith the old entry retained like other removed enumerators, zero-filling atload time. No functional changes.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Sat, 15 Aug 2026 02:56:56 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>d7832ba1a4a4f462ce94c81960adf10f7e87ae7a - sched_ext: Set up ops.sub_ecaps_updated() dispatch context on the executing CPU</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#d7832ba1a4a4f462ce94c81960adf10f7e87ae7a</link>
        <description>sched_ext: Set up ops.sub_ecaps_updated() dispatch context on the executing CPUscx_process_sync_ecaps() sets up the dispatch context forops.sub_ecaps_updated() in the target cpu&apos;s pcpu context recovered from thellist node. However, the context is per executing cpu: the dispatch kfuncsresolve it with this_cpu_ptr() and the dispatch buffer lives in it. What thedispatches target is determined by the rq recorded in the context, not bywhich cpu&apos;s context it is. Under core scheduling the pick runs balance_one()for sibling rqs, so a sync processed for a sibling invokes the op with theexecuting cpu&apos;s context not set up and its dispatch kfuncs misoperate on aNULL or stale rq.Set up the executing cpu&apos;s dsp_ctx instead, matching scx_dispatch_sched().The recorded rq keeps the dispatches targeting the synced cpu.Fixes: b81a6c018cde (&quot;sched_ext: Add sub_ecaps_updated() effective-cap change notifier&quot;)Reported-by: David Carlier &lt;devnexen@gmail.com&gt;Link: https://lore.kernel.org/all/20260813045931.8691-1-devnexen@gmail.com/Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Fri, 14 Aug 2026 19:46:46 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>a8dc810968af02190f55cc7574bc87c93156f266 - sched_ext: Convert sub-cap kfuncs to __arena cmask arguments</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#a8dc810968af02190f55cc7574bc87c93156f266</link>
        <description>sched_ext: Convert sub-cap kfuncs to __arena cmask argumentsThe sub-cap kfuncs take their cmask arguments as __ign pointers. The valuescross the kfunc boundary as unchecked scalars and scx_cmask_ref_init()rebases them into the arena by hand.BPF now translates between BPF and kernel arena addresses for __arenaarguments. Tag the cmask arguments __arena so the kfuncs receive kerneladdresses and scx_cmask_ref_init() loses the hand-rolled conversion. Theoptional denied_out keeps its NULL not-provided signal via__arena__nullable. The mandatory masks use plain __arena.scx_qmap&apos;s call sites drop the (void *)(long) casts since the BPF-sidedeclarations type the cmask arguments __arena and take arena pointersdirectly.The arena argument address translation is currently implemented only onx86-64. Schedulers calling these kfuncs load only there for now.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Wed, 12 Aug 2026 21:55:33 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>67f1f4a48c24974e392188602b477741186fa8ce - sched_ext: Pass kernel arena pointers to ops_cid callbacks</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#67f1f4a48c24974e392188602b477741186fa8ce</link>
        <description>sched_ext: Pass kernel arena pointers to ops_cid callbacksThe cid-form set_cmask() and sub_caps_updated() callbacks receive cmasksthat the kernel builds in the arena, and the kernel converts the kerneladdresses to the BPF arena pointer form by hand before each call.BPF now translates between BPF and kernel arena addresses for __arenaarguments. Tag the arguments __arena in the cfi stubs and the ops_cid memberdeclarations and pass the kernel arena addresses directly, dropping themanual scx_kaddr_to_arena() conversions and the now-unused helper. Thedelivered value is unchanged and existing BPF-side code works as before.The arena argument address translation is currently implemented only onx86-64. cid-form schedulers implementing these callbacks load only there fornow.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Wed, 12 Aug 2026 21:55:33 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>294d95ff251b4333c1449ff000ed0aef478fbc9d - Merge branch &apos;for-7.3&apos; into for-7.3-arena-args</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#294d95ff251b4333c1449ff000ed0aef478fbc9d</link>
        <description>Merge branch &apos;for-7.3&apos; into for-7.3-arena-args

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Wed, 12 Aug 2026 21:55:20 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>1be10bb07085bf04e3579d2c3471d0b7a3f84ba4 - sched_ext: Merge branch &apos;for-7.2-fixes&apos; into for-7.3</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#1be10bb07085bf04e3579d2c3471d0b7a3f84ba4</link>
        <description>sched_ext: Merge branch &apos;for-7.2-fixes&apos; into for-7.3Pull to receive: c10b216a072f (&quot;sched/core: Handle pick_task() releasing the rq lock&quot;) f3629c63a4af (&quot;sched/core: Make core-sched flips wait for in-flight selections&quot;) ffaab58d2175 (&quot;sched_ext: Replace SCX_RQ_BAL_KEEP with a dispatch verdict return&quot;) 3dd52416e44a (&quot;sched_ext: Fix this_rq() assumptions in dispatch kfuncs&quot;) f2da9587118d (&quot;sched_ext: Count rq lock releases in rq-&gt;scx.lock_drop_seq&quot;) d954004205c1 (&quot;sched_ext: Fix rq-&gt;core_pick corruption under core scheduling&quot;)for the pending core scheduling follow-ups and to resolve the conflictswith the code reorganization and cap gate work on for-7.3.ffaab58d2175 converts scx_dispatch_sched() to a dispatch verdict returnwhich for-7.3 moved from ext.c into inlines.h. Resolved by applying theconversion to the relocated copy and combining balance_one()&apos;s verdictreturns with the scx_task_can_stay_on_cpu() gate from the cap work.ffaab58d2175 and 3dd52416e44a update scx_bpf_sub_dispatch() whichfor-7.3 moved into sub.c. Resolved by applying the scx_locked_rq()switch and the verdict test to the sub.c copy.f2da9587118d instruments the open-coded lock releases inconsume_remote_task() which for-7.3 folded into switch_rq_lock().Resolved by keeping the accounting in switch_rq_lock() which covers allits callers.d954004205c1 widens the put_prev_task_scx() WARN suppression to allcore-sched rqs on the same condition that for-7.3 gated withscx_task_can_stay_on_cpu(). Resolved by combining both.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Wed, 12 Aug 2026 18:46:28 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>bb70e4fb626b70895b7917ee97c256f24d019c34 - sched_ext: Eject the top rescue consumer on overload</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#bb70e4fb626b70895b7917ee97c256f24d019c34</link>
        <description>sched_ext: Eject the top rescue consumer on overloadWhen rescue demand on a cpu persistently exceeds the configured bandwidth,tasks age on that cpu&apos;s rescue DSQ until the stall watchdog fires. Thewatchdog blames the waiting task&apos;s owner, but the misbehaving party iswhoever floods the queue, not whoever happens to time out.Track each sched&apos;s recent rescue consumption per cpu as a decaying average.Once the oldest waiter on a cpu&apos;s rescue DSQ has been queued past athreshold derived from the rescue knobs (4s at the defaults), the rescuetimer ejects the sub with the highest recent consumption on that cpu withSCX_EXIT_ERROR_RESCUE. With no recent consumer there is no victim andnothing is ejected - the generic stall watchdog eventually blames thewaiter&apos;s owner instead. Ejections on a cpu are spaced one threshold apart sothe freed bandwidth can drain the backlog before another sub is judged.The overload check only wins the race against the stall watchdog when thewatchdog timeout clears the threshold, and a single in-budget wait must notcross the trigger on its own. Warn on a scheduler whose timeout doesn&apos;t fitand on knobs whose funding period exceeds half the threshold.v2: - Track kill_at in jiffies_64 - on 32-bit, the time_before() grace check      wraps 2^31 ticks after the last ejection and suppresses ejections.      (sashiko AI)    - Track rescue_avg_at in jiffies_64 likewise - the unsigned long decay      delta truncates mod 2^32 on 32-bit and can revive a weeks-old usage      average in the victim pick.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 03 Aug 2026 23:01:36 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>5fd501744b10814f5c12899ce86d223cee2c51ca - sched_ext: Add bandwidth-limited rescue execution for stranded tasks</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#5fd501744b10814f5c12899ce86d223cee2c51ca</link>
        <description>sched_ext: Add bandwidth-limited rescue execution for stranded tasksA local DSQ insert lacking the needed caps is diverted to the reject DSQ andbounced back through ops.enqueue() so the scheduler can re-decide. Thatrecovery assumes the scheduler has somewhere legal to send the task. When itdoesn&apos;t, e.g. when the task&apos;s affinity is restricted to cids delegated away,the task starves until the stall watchdog ejects the scheduler. An exitingtask is worse - it skips ops.enqueue() and the rejection becomes aself-requeuing cycle that burns the CPU until the watchdog fires.Add SCX_ENQ_RESCUE, a fallback modifier on local DSQ inserts. When theinsert would be rejected for missing caps, the kernel takes over and runsthe task on the target CPU without consulting the owning scheduler. Thekernel sets the flag itself when enqueueing an exiting task.Rescue is a last-resort forward-progress backstop with a persistentdisadvantage, not a way around cap enforcement. A per-CPU token bucketaccrues rescue_bandwidth_ppt (default 2%) of CPU time and rescues run one ata time in arrival order. Each is granted a slice of the rescue_quantum_us(default 5ms) quantum divided across the waiters, waits at the tail of thelocal DSQ claiming no priority, and rejoins its scheduler as a fresh arrivalonce the slice is served.The schedulers keep their normal control over an admitted rescuee and maypreempt or reslice it. Service is measured on CPU time actually received, soneither shortens the rescue. Prolonged denial escalates - the remainingslice turns into protected execution (SCX_TASK_PROTECTED) and the rescueepreempts the current task. Escalation is paced by the same bucket, anddelivered service converges on the configured bandwidth no matter howaggressively the schedulers dispatch.Both knobs are root-only and SCX_RESCUE_DISABLE turns rescue off, makingSCX_ENQ_RESCUE inserts reject as usual.v2: - Add SCX_OPS_OPEN() fix-ups for the new ops fields so cpu-form      schedulers setting them still load on older kernels. (Andrea)Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 03 Aug 2026 23:01:29 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>78f8d726e62e0b72a4b11e5778d2d7e252b076c0 - sched_ext: Make SCX_ENQ_IGNORE_CAPS waive the preemption cap too</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#78f8d726e62e0b72a4b11e5778d2d7e252b076c0</link>
        <description>sched_ext: Make SCX_ENQ_IGNORE_CAPS waive the preemption cap tooSCX_ENQ_IGNORE_CAPS is kernel-internal and marks a placement the kernelforces. scx_caps_for_enq() waives the enqueue cap for it, but a PREEMPTinsert still picks up the preemption cap requirement fromscx_caps_for_preempt(). Update scx_caps_for_preempt() to take enq_flags andrequire nothing when SCX_ENQ_IGNORE_CAPS is set.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 03 Aug 2026 23:01:07 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>8b3b8522c9139c18b8dbbafbeb0c903609e5a27d - sched_ext: Rename scx_local_or_reject_dsq() to scx_resolve_local_dsq()</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#8b3b8522c9139c18b8dbbafbeb0c903609e5a27d</link>
        <description>sched_ext: Rename scx_local_or_reject_dsq() to scx_resolve_local_dsq()The following rescue execution addition gives the function a third possibledestination, making a name that enumerates the outcomes a poor fit. Renameto the destination-neutral scx_resolve_local_dsq(). No functional changes.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 03 Aug 2026 23:00:31 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>1bf623ebd50315260ce6da9601e4cd3e79659152 - sched_ext: Format bstr exit messages after claiming the exit</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#1bf623ebd50315260ce6da9601e4cd3e79659152</link>
        <description>sched_ext: Format bstr exit messages after claiming the exitThe bstr exit kfuncs format the message into a shared static buffer under araw spinlock before initiating the exit. The lock can&apos;t be taken from NMIand needlessly serializes all bstr exits system-wide.Now that exit claiming is lock-free, reverse the order: claim the exit firstand format directly into the exit_info message buffer which the claim winnerowns exclusively. The new scx_exit_bstr() implements the sequence, replacingscx_bstr_format(), and the shared buffer and lock are deleted; the formatteritself is what bpf_trace_printk() already runs from NMI. scx_prog_sched()callers were relying on the lock for RCU protection, which is now providedexplicitly.A malformed format no longer changes or fails the requested operation:scx_bpf_exit_bstr() keeps its graceful exit kind and scx_bpf_sub_kill_bstr()still kills the child, with a fallback message carrying the formattingerrno, while the sched that supplied the bad format is aborted for its bug.Before this and the previous patch, an &quot;any&quot; category kfunc called from NMIcontext could trigger scx_error() and deadlock - e.g. a tracing progattached to a function running in NMI calling scx_bpf_dsq_peek() on anon-existent DSQ would try to grab scx_sched_lock, which may be held by theinterrupted CPU. This and the previous patch fix the deadlock: scx_error()and the bstr exit kfuncs, and thus scx_bpf_error() and scx_bpf_exit(), arenow safe to call from any context including NMI.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 27 Jul 2026 23:20:32 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>f883dbb64ca53f75d9006d1e73180c9d9ecfc9a2 - sched_ext: Make exit claiming lock-free</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#f883dbb64ca53f75d9006d1e73180c9d9ecfc9a2</link>
        <description>sched_ext: Make exit claiming lock-freescx_claim_exit() claims descendants&apos; exits by walking the subtree underscx_sched_lock, making exit claiming, and thus scx_error(), unusable fromNMI and from under scx_sched_lock. However, kfuncs raising errors can runfrom NMI-attached BPF progs, the hardlockup handler runs in NMI, andscx_link_sched() wants to report failures under the lock.The walk does two things with different urgencies: -&gt;aborting must beasserted synchronously to break IRQs-off dispatch-path live-locks, while thedescendants&apos; exit_kind claims can happen later. Split them: sweep -&gt;abortinglocklessly under RCU to unwedge the system and defer the lockedSCX_EXIT_PARENT walk to a new irq_work, both of which are NMI-safe.The sweep stores each node&apos;s -&gt;aborting and then reads its children listwhile scx_link_sched() inserts and then checks the parent&apos;s -&gt;aborting, thetwo sides paired by full barriers - one side always sees the other. A linkthat sees -&gt;aborting undoes its insert and fails. As the undo&apos;slist_del_rcu() leaves -&gt;sibling non-empty, list_empty() can no longeridentify a never-linked sched during teardown - add sch-&gt;linked instead.trace_sched_ext_exit can now fire from NMI and is called after the-&gt;aborting stores so that its callbacks don&apos;t hold up live-lock recovery.The exit backtrace is skipped for NMI exits as stack_trace_save()&apos;sNMI-safety is arch-dependent and undocumented.v2: Move trace_sched_ext_exit() after the -&gt;aborting stores (Andrea).Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Mon, 27 Jul 2026 23:20:23 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>7706d6e4f2e3ad7dfb92b84cacd0c16e6e3c8381 - sched_ext: Bound per-task reenqueues and eject the owning scheduler</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#7706d6e4f2e3ad7dfb92b84cacd0c16e6e3c8381</link>
        <description>sched_ext: Bound per-task reenqueues and eject the owning schedulerUnlike local reenqueues, cap rejections have no repeat limit. Amalfunctioning scheduler can keep re-inserting a task to a cid it lacks capson, cycling the task through reject and reenqueue. This was assumed safebecause a task that never runs trips the stall watchdog. However, thereenqueue irq_work re-arms itself and outranks the timer vector, blockingeverything else on the CPU including stall detection and recovery, until theNMI hardlockup detector fires.Local reenqueues already have a repeat cap, SCX_REENQ_LOCAL_MAX_REPEAT,which needs generalizing to cover all reenqueues. It also has an attributionproblem. Counted per-cpu on root, it tears down the whole hierarchy evenwhen a sub-scheduler caused the repeated reenqueues.Generalize by bounding every reenqueue with one per-task counter. reenq_cntis bumped in scx_do_enqueue_task() on each SCX_ENQ_REENQ, the single pathevery reenqueue producer passes through, and cleared in clr_task_runnable()when the task is picked to run and in scx_disable_task() when it leaves thescheduler&apos;s control. Past SCX_REENQ_MAX_REPEAT the task&apos;s owning scheduleris ejected with a new SCX_EXIT_ERROR_REENQ and the task is left stranded tobe picked up during sched exit.The SCX_EV_REENQ_LOCAL_REPEAT event becomes SCX_EV_REENQ_REPEAT, countingrepeat reenqueues from all sources.v2: Count SCX_EV_REENQ_REPEAT only when a reenqueue leads to another    reenqueue, not on every reenqueue.v3: - Also clear reenq_cnt in scx_disable_task() so that the count doesn&apos;t      carry over to the next owner across sched class switches, scheduler      replacement or sub-scheduler rehoming (Andrea Righi).    - Update the stale SCX_EV_REENQ_LOCAL_REPEAT references in sched-ext.rst      (Andrea Righi).Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Sun, 26 Jul 2026 23:11:51 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>ce228343010df67e0a35bd1a9980abcfdf9cf95f - sched_ext: Resolve most remaining scx_root accesses</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#ce228343010df67e0a35bd1a9980abcfdf9cf95f</link>
        <description>sched_ext: Resolve most remaining scx_root accessesscx_root is __rcu and naked accesses were left as transitional markers forthe multi-scheduler transition, to be converted to accesses through theassociated scheduler instances. Most accesses have since been converted toresolve the sched from the program or task at hand. The remaining nakedsites divide into ones that semantically always want the root sched, whichthis patch resolves, and one that is left to a later patch.The resolved sites:- The SCX_OPS_TID_TO_TASK validation and the ecaps sync kick already hold a  sched whose ancestors[] pins the root as entry 0 with plain pointers  stable for the sched&apos;s lifetime. Reach the root through the sched at hand.- The dispatch entry, class switch, idle notification and fork init paths  only execute while the scheduler is live and scx_root never changes inside  the live window, so no update can race them. Add scx_root_protected_live()  which documents that invariant and resolves with a plain load.- The hotplug path, including the ecaps reseeds, runs with the hotplug lock  held, which excludes the scx_root writers. Add scx_root_protected(), which  accepts either the hotplug lock or scx_enable_mutex.- Is-root tests use a zero level instead of comparing against the global.touch_core_sched_dispatch() stays naked, to be resolved by a later patch.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Fri, 24 Jul 2026 03:07:56 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>7947442047cff1d296ab615b8c6ddbc7c9b7bf21 - sched_ext: Add scx_cgroup_sched() for cgrp-&gt;scx_sched reads</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#7947442047cff1d296ab615b8c6ddbc7c9b7bf21</link>
        <description>sched_ext: Add scx_cgroup_sched() for cgrp-&gt;scx_sched readscgrp-&gt;scx_sched is __rcu and published with rcu_assign_pointer() but everyreader loads it with a plain access, so sparse flags all of them. The readsare lock-protected: enable/disable paths rewrite the field under all ofscx_enable_mutex, scx_fork_rwsem and cgroup_mutex, and cgroup creationinherits the parent&apos;s sched under cgroup_mutex before the new cgroup isreachable, so holding any one of the three locks makes the read stable.Add scx_cgroup_sched() which states the protection withrcu_dereference_check() and convert the readers. No functional changes.Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Fri, 24 Jul 2026 03:07:56 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>00a08ddfb48bb85885a8665bc56716c4d2f9bd82 - sched_ext: Fix stale errno in scx_sub_enable_workfn()</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#00a08ddfb48bb85885a8665bc56716c4d2f9bd82</link>
        <description>sched_ext: Fix stale errno in scx_sub_enable_workfn()The nesting depth check and the cgroup online check inscx_sub_enable_workfn() reach err_disable without setting ret, sothe fallback error added by commit db4e9defd2e8 (&quot;sched_ext: Recordan error on errno-only sub-enable failure&quot;) reports&quot;scx_sub_enable() failed (0)&quot;.This is currently harmless because both paths record their ownscx_error() first and the first error wins, but it leaves thefallback broken for these paths. Set -EINVAL and -ENODEV thereso the fallback always reports a real errno.v2: The validate_ops() path from v1 is already fixed in for-7.3    (sub.c already has ret = scx_validate_ops()), so only the two    remaining paths are addressed.Signed-off-by: Cui Jian &lt;cjian720@163.com&gt;Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Wed, 22 Jul 2026 12:03:52 +0200</pubDate>
        <dc:creator>Cui Jian &lt;cjian720@163.com&gt;</dc:creator>
    </item>
<item>
        <title>3a773220d39ba993dfe5d135f8b610be10794d5d - sched_ext: Build the cid tables privately and publish them with RCU</title>
        <link>http://kernelsources.org:8080/source/history/linux/kernel/sched/ext/sub.c#3a773220d39ba993dfe5d135f8b610be10794d5d</link>
        <description>sched_ext: Build the cid tables privately and publish them with RCUThe cid tables are visible to the cid kfuncs while being modified: thefirst enable publishes the global pointers before filling them,ops.init_cids() overrides rewrite them in place, and re-enables rebuildthem in place. A racing TRACING or SYSCALL program can read unfilledentries, including uninitialized memory in the kmalloc&apos;d tables, or torntopo updates.Tie the tables&apos; lifetimes to the root sched instead: each root enablebuilds a fresh set privately and publishes the per-table __rcu globals oncethe layout is final, and root disable unpublishes and RCU-frees the set. Anon-NULL global is now always a fully built table which stays valid for thereader&apos;s RCU read section, and lookups stay two loads. Kfuncs treat NULL asno-mapping, also after the scheduler exits instead of reporting the stalelast mapping.The cid kfuncs are available whether the root scheduler is cid-form orcpu-form, the latter to allow gradual migration to cids. Every roottherefore builds and publishes a default mapping.Every reader must either be gated on scheduler liveness or NULL-checkinside an RCU read section. Fix the two kfuncs that were neither:scx_bpf_this_cid() read the table with no RCU or preemption protection andscx_bpf_task_cid() relied on KF_RCU, which doesn&apos;t put a sleepable programin an RCU read section. The hotplug callbacks are instead serialized byretiring the tables inside the cpus_read_lock() section that clearsscx_root.v2: Document why every root builds the tables (desc + cid.c comment).Reported-by: Andrea Righi &lt;arighi@nvidia.com&gt;Closes: https://lore.kernel.org/r/al3tLtPZZkFjMveK@gpd4Reviewed-by: Andrea Righi &lt;arighi@nvidia.com&gt;Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;

            List of files:
            /linux/kernel/sched/ext/sub.c</description>
        <pubDate>Wed, 22 Jul 2026 10:22:18 +0200</pubDate>
        <dc:creator>Tejun Heo &lt;tj@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
