preempt_schedule_notrace(9)
π NAME π
preempt_schedule_notrace β it's preempt_schedule called by tracing, and yes bestie, that's the whole vibe π
β¨ SYNOPSIS β¨
__visible void notrace preempt_schedule_notrace (void );
π ARGUMENTS π
voidβ no arguments. Not a single one, bestie. Clean. Iconic. π«Ά
π¦ DESCRIPTION π¦
Okay so the tracing infrastructure uses preempt_enable_notrace to prevent recursion and to prevent tracing the preempt enabling caused by the tracing infrastructure itself. No cap. π₯
But here's the plot twist π: tracing can happen in areas coming from userspace or just about to enter userspace, so a preempt enable can occur before user_exit is called. That will cause the scheduler to be called when the system is still in usermode. It's giving "not the moment" energy, fr fr.
To prevent this, preempt_enable_notrace will use this function instead of preempt_schedule to exit user context if needed before calling the scheduler. Slay. β
πΈ SEE ALSO πΈ
Kernel file ./kernel/sched/core.c:
wake_q_add(9)wake_q_add_safe(9)task_curr(9)try_to_wake_up(9)task_call_func(9)cpu_curr_snapshot(9)wake_up_process(9)preempt_notifier_register(9)preempt_notifier_unregister(9)prepare_task_switch(9)finish_task_switch(9)schedule_tail(9)schedule_preempt_disabled(9)init_idle(9)curr_task(9)
That's the whole page, bestie π«Ά β source/version is ./kernel/sched, dated October 2026, and it's the preempt_schedule_notrace(9) page. periodt π
β¨
π¦ 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