aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2024-06-18 20:09:18 +0000
committerTejun Heo <[email protected]>2024-06-18 20:09:18 +0000
commit7bb6f0810ecfb73a9d7a2ca56fb001e0201a6758 (patch)
tree8d229f62d4cabab1cdd1c397f4383eb6772bc555 /lib/dump_stack.c
parentsched_ext: Implement runnable task stall watchdog (diff)
downloadkernel-7bb6f0810ecfb73a9d7a2ca56fb001e0201a6758.tar.gz
kernel-7bb6f0810ecfb73a9d7a2ca56fb001e0201a6758.zip
sched_ext: Allow BPF schedulers to disallow specific tasks from joining SCHED_EXT
BPF schedulers might not want to schedule certain tasks - e.g. kernel threads. This patch adds p->scx.disallow which can be set by BPF schedulers in such cases. The field can be changed anytime and setting it in ops.prep_enable() guarantees that the task can never be scheduled by sched_ext. scx_qmap is updated with the -d option to disallow a specific PID: # echo $$ 1092 # grep -E '(policy)|(ext\.enabled)' /proc/self/sched policy : 0 ext.enabled : 0 # ./set-scx 1092 # grep -E '(policy)|(ext\.enabled)' /proc/self/sched policy : 7 ext.enabled : 0 Run "scx_qmap -p -d 1092" in another terminal. # cat /sys/kernel/sched_ext/nr_rejected 1 # grep -E '(policy)|(ext\.enabled)' /proc/self/sched policy : 0 ext.enabled : 0 # ./set-scx 1092 setparam failed for 1092 (Permission denied) - v4: Refreshed on top of tip:sched/core. - v3: Update description to reflect /sys/kernel/sched_ext interface change. - v2: Use atomic_long_t instead of atomic64_t for scx_kick_cpus_pnt_seqs to accommodate 32bit archs. Signed-off-by: Tejun Heo <[email protected]> Suggested-by: Barret Rhoden <[email protected]> Reviewed-by: David Vernet <[email protected]> Acked-by: Josh Don <[email protected]> Acked-by: Hao Luo <[email protected]> Acked-by: Barret Rhoden <[email protected]>
Diffstat (limited to 'lib/dump_stack.c')
0 files changed, 0 insertions, 0 deletions