]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: Add an event, SCX_EV_ENQ_SLICE_DFL
authorChangwoo Min <changwoo@igalia.com>
Fri, 7 Feb 2025 06:40:51 +0000 (15:40 +0900)
committerTejun Heo <tj@kernel.org>
Fri, 7 Feb 2025 21:24:59 +0000 (11:24 -1000)
commit6d3f8fb4b2d47b7b6581a1a5a6ce35700f1416e6
treef1f26f7e23e37b7b9e61d46ef867f2c5212b5d03
parent2494e555fbaadf1b02eb89f3bee0cec95516f6c2
sched_ext: Add an event, SCX_EV_ENQ_SLICE_DFL

Add a core event, SCX_EV_ENQ_SLICE_DFL, which represents how many
tasks have been enqueued (or pick_task-ed or select_cpu-ed) with
a default time slice (SCX_SLICE_DFL).

Scheduling a task with SCX_SLICE_DFL unintentionally would be a source
of latency spikes because SCX_SLICE_DFL is relatively long (20 msec).
Thus, soaring the SCX_EV_ENQ_SLICE_DFL value would be a sign of BPF
scheduler bugs, causing latency spikes, especially when ops.select_cpu()
is provided.

__scx_add_event() is used since the caller holds an rq lock or p->pi_lock,
so the preemption has already been disabled.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c