scx_discard..._ecaps_syncs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scx_discard_stale_ecaps_syncs(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this one's a tiny little function with a big job and honestly? she's giving cleanup crew main character energy πŸ§ΉπŸ’–


🌸 NAME 🌸

scx_discard_stale_ecaps_syncs β€” literally just throws away ecaps syncs that got left behind by schedulers from before πŸ—‘οΈβœ¨ no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

void scx_discard_stale_ecaps_syncs (void );

that's it. that's the whole vibe. πŸŽ€


πŸ“ ARGUMENTS πŸ“

  • void β€” no arguments, babe. nothing. zero. she takes nothing and she gives you a clean slate 🫢

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” you call this bad girl during root enable, before the scheduler goes live. like, right before the party starts πŸŽ‰

the situation is this: an earlier root's sub-sched might not have made it through its RCU free path yet (for example, a still-open link fd defers it 😭), and that can leave queued ecaps syncs just… sitting there. abandoned. orphaned. lowkey haunting the place πŸ‘»

and yes, technically you could process them β€” but that would mean decoding the dead sched's pshards using the current cid layout, which is a whole mess and not the vibe at all πŸ’€ so no. we don't do that. we discard them instead. bye bestie πŸ‘‹

the good news? the backing scx_sched_pcpu's are still allocated, because the free path removes ecaps_to_sync_node before freeing. so nothing's dangling, we're safe, we're slaying, periodt πŸ’…βœ¨

ngl this is one of those "do it in the right place at the right time or everything gets weird" functions β€” the ordering genuinely matters, don't improvise πŸ™ˆ

🌈 SEE ALSO 🌈

okay so if you wanna go down the rabbit hole, the kernel file lives at ./kernel/sched/ext/sub.c and here's the whole friend group πŸ‘‘πŸ’œ


and that's the whole page, bestie!! 🫢✨ this lil icon comes from ./kernel/sched/ext, dated October 2026, and yeah β€” the manpage name is still scx_discard..._ecaps_syncs(9) if you need to cite her in a paper or whatever πŸ“šπŸ’– mwah, go read some kernel source, ily πŸ’œπŸŽ€

πŸ“¦ where this page comes from