htb_change_class_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ htb_change_class_mode(9) ✨

okay so bestie, this is a page from the Kernel API Manual β€” yes, the kernel, we're in the big leagues now πŸ’… β€” and it's all about htb_change_class_mode, a lil function whose whole entire job is changing a class's mode. that's it. that's the name. iconic behavior, honestly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void htb_change_class_mode (struct htb_sched *q , struct htb_class *cl ,
s64 *diff );

like, no return value, no drama β€” it just does the thing and dips ✨


🌸 ARGUMENTS 🌸

  • q β€” the priority event queue, i.e. where all the important scheduling stuff lives 🫢
  • cl β€” the target class. the one we're mode-shifting. main character energy fr fr πŸ‘‘
  • diff β€” diff time, measured in microseconds ⏱️ (micro, not milli, don't get it twisted)

πŸ’– DESCRIPTION πŸ’–

so the way this works: under normal circumstances, this routine should be the only way you ever change a class's mode. like, the one true path. no cap 🚫🧒

when you call it, it:

  • updates the feed lists linkage πŸ”—
  • changes the mode
  • adds the class to the wait event queue if appropriate (only if, bestie β€” it's conditional, don't @ me)

a couple of things you gotta respect or it's giving chaos 😭:

the new mode should be different from the old one β€” genuinely, don't pass the same mode, that's not a vibe
cl->pq_key has to be valid if you're changing to a mode other than HTB_CAN_SEND β€” and like, go look at htb_add_to_wait_tree if you need the deets on that one πŸ‘€

⭐ SEE ALSO ⭐

kernel file ./net/sched/sch_htb.c β€” and the whole friend group of htb functions, all slaying in their own lanes 🌈:


okay that's the whole page, you ate it up, you understood the assignment πŸ’œ this lil cutie lives in ./net/sched and the docs are dated October 2026 β€” so yeah, future-proof AND cunty πŸ§šπŸ’« mwah, go change some modes responsibly ✨

πŸ“¦ where this page comes from