__wake_up_locked_sync_key(9)
π¦ NAME π¦
__wake_up_locked_sync_key β and yes bestie, this is the Kernel API Manual page for it β wakes up a thread blocked on a locked waitqueue. That's the whole assignment π
β¨ SYNOPSIS β¨
void __wake_up_locked_sync_key (struct wait_queue_head *wq_head , unsigned int mode , void *key );
π ARGUMENTS π
wq_headβ the waitqueue. literally the queue we're working with π«Άmodeβ which threads. it picks who gets the wakeup energy β¨keyβ opaque value to be passed to wakeup targets. it's giving βjust pass it through, no questionsβ π
π DESCRIPTION π
Okay so the sync wakeup is different: the waker knows that it will schedule away soon, so while the target thread will be woken up, it will not be migrated to another CPU β ie. the two threads are 'synchronized' with each other. This can prevent needless bouncing between CPUs. no cap, that's a cute little CPU-drama reducer π
On UP it can prevent extra preemption. iconic behavior honestly β
Also important: if this function wakes up a task, it executes a full memory barrier before accessing the task state. that's a whole memory-barrier moment β don't sleep on it π₯
π SEE ALSO π
Kernel file ./kernel/sched/wait.c has the receipts: __wake_up(9), __wake_up_sync_key(9), and finish_wait(9). go read those too bestie πβ¨
This page is from ./kernel/sched, dated October 2026, and it's literally called __wake_up_locked_sync_key(9) β bye bestie, slay your waitqueues ππ¦β¨
π¦ 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