__scx_add_event(9)
π __scx_add_event(9) β like, the Kernel API Manual page, but make it make sense π
okay bestie, so this lil function lives in the Kernel API Manual and honestly? it's giving "small but mighty." it bumps an event counter for name up by cnt. that's it. that's the whole vibe. β¨
β¨ NAME β¨
__scx_add_event β increase an event counter for name by cnt π
no cap, that's literally what it does. counter go brrr. πΈ
π SYNOPSIS π
__scx_add_event (sch , name , cnt );
look at her. three args, zero drama. π«Ά
π ARGUMENTS π
schβ thescx_schedyou're accounting events for. like, whose stats are we updating, bestie? πnameβ an event name defined instruct scx_event_stats. pick your fighter, it has to be one of those, okay? πcntβ the number of the event that occurred. yes, it's a count. yes, you can count on it. π₯
π¦ DESCRIPTION π¦
so here's the tea: this should be used only when preemption is disabled. β οΈ not "usually," not "probably," not "whenever you feel like it." only. the way that this is a hard requirement and not a suggestion π please respect it.
fr fr, preemption disabled. don't come crying to me if you ignore this. π
π SEE ALSO π
go touch some grass in the kernel source, specifically this file:
./kernel/sched/ext/internal.hβ the home base π
and then the whole squad, because the manpage said so and we don't skip entries in this house:
scx_add_event(9)struct scx_enable_args(9)struct sched_ext_ops(9)struct sched_ext_ops_cid(9)scx_arena_to_kaddr(9)scx_kaddr_to_arena(9)DEFINE_SCX_COMPAT_MARKER(9)scx_root_protected_live(9)scx_root_protected(9)scx_bypass_dsp_enabled(9)scx_ops_sanitize_err(9)scx_has_subs(9)scx_task_sched(9)scx_task_sched_rcu(9)scx_task_on_sched(9)scx_prog_sched(9)scx_parent(9)
iykyk. read them all. π
sign-off szn: this absolute banger of a page comes from ./kernel/sched/ext, dated October 2026, and it's the __scx_add_event(9) manual page one last time for the people in the back. slay, stay preemption-free, and happy counting πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms