summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-sqlite-record
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-07-13 22:18:44 -1000
committerTejun Heo <tj@kernel.org>2026-07-13 22:18:44 -1000
commit6ea3be36808100336dffb4b04a6e5a483a26a649 (patch)
tree96b652beddfd11be63f4deb03193007c2c774991 /tools/perf/scripts/python/bin/export-to-sqlite-record
parent701b7bcad8681b161de791579aeb3de285f9a20f (diff)
sched_ext: Gate kicks on SCX_CAP_BASE and preemption on SCX_CAP_PREEMPT
A kick forces a scheduling event on the target cpu, and a preemption also evicts the running task. Gate both on caps. Any kick requires baseline access on the cid, and preempting a task the sub-sched does not own - whether by a SCX_ENQ_PREEMPT insert or a SCX_KICK_PREEMPT kick - requires the new SCX_CAP_PREEMPT. Gating either alone would leave a hole - the weakest cap authorizing preempting kicks, or plain kicks disturbing cpus the kicker has no access to. Preempting the sched's own subtree is always allowed, and the cap extends the right to any task on the cid. PREEMPT implies ENQ, and so ENQ_IMMED. A preempting insert tests the running task under the target rq lock and is rejected and reenqueued unless the victim is in the inserter's subtree or it holds PREEMPT. A migration-disabled task is admitted regardless, but with SCX_ENQ_PREEMPT stripped. Kicks are enforced on the delivery path, where the effective caps can be read coherently under the target rq's lock. A kick from a sub-sched lacking SCX_CAP_BASE on the cid is dropped, and a SCX_KICK_PREEMPT kick without PREEMPT for a task outside the kicker's subtree degrades to a plain reschedule. Unlike the enqueue caps, PREEMPT is checked only at the instant of the insert or kick, never as a standing property of a queued task. v2: Clear SCX_ENQ_PREEMPT on the offline and migration_pending force-admits. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-sqlite-record')
0 files changed, 0 insertions, 0 deletions