hwlat_mode_write(9)
π 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 singlehwlatdthread 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 singlehwlatdthread runs and migrates among the allowed CPUs in a round-robin fashion. One thread, many CPUs, iconic behavior."per-cpu"β creates onehwlatdthread per allowed CPU. One thread for every allowed CPU, matching energy all around. π¦
π SEE ALSO π
- Kernel file
./kernel/trace/trace_hwlat.cβget_sample(9),init_tracefs(9)
Source/version: ./kernel/trace Β· October 2026 β thatβs the whole tea, now go write that "mode" entry π
β¨π
π¦ 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