hwlat_mode_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to hwlat_mode_write(9) β€” yes, section 9, straight out of the Kernel API Manual β€” and this page is literally the β€œWrite function for "mode" entry.” We're writing to the hardware latency detector's "mode" knob, and it's giving very specific thread-vibe energy. πŸ’…


✨ SYNOPSIS ✨

ssize_t hwlat_mode_write (struct file *filp , const char __user *ubuf ,
size_t cnt , loff_t *ppos );

🫢 ARGUMENTS 🫢

  • filp β€” the active open file structure, aka the file's main character at this exact moment.
  • ubuf β€” the user buffer that contains the value to write. This is where the tea lives.
  • cnt β€” the maximum number of bytes to write to "file" β€” yes, that quoted "file" is exactly the situation, no cap.
  • ppos β€” the current position in file. Tracking where we are, bestie.

🌸 DESCRIPTION 🌸

So this function provides a write implementation for the "mode" interface to the hardware latency detector. And hwlatd has different operation modes, so this is where you pick the whole vibe:

  • "none" β€” sets the allowed cpumask for a single hwlatd thread at the startup and lets the scheduler handle the migration. Like, the scheduler is driving, periodt.
  • "round-robin" β€” this is the default mode, and it's giving rotation. A single hwlatd thread runs and migrates among the allowed CPUs in a round-robin fashion. One thread, many CPUs, iconic behavior.
  • "per-cpu" β€” creates one hwlatd thread per allowed CPU. One thread for every allowed CPU, matching energy all around. πŸ¦‹

πŸŽ€ SEE ALSO πŸŽ€


Source/version: ./kernel/trace Β· October 2026 β€” that’s the whole tea, now go write that "mode" entry πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from