proc_dointvec_ms_jiffies(9)
πΈ proc_dointvec_ms_jiffies(9) πΈ
okay so bestie, this one's from the Kernel API Manual and it's honestly kind of a little legend β it's the sysctl handler that reads your integers as milliseconds and quietly does the jiffies math for you. lowkey iconic. π
β¨ NAME β¨
proc_dointvec_ms_jiffies β read a vector of integers as 1 milliseconds π°οΈ
π¦ SYNOPSIS π¦
int proc_dointvec_ms_jiffies (const struct ctl_table *table , int dir ,
void *buffer , size_t *lenp , loff_t *ppos );
like, that's the whole signature, no cap β¨
π ARGUMENTS π
tableβ the sysctl table, bestie. it's the whole vibe container π«ΆdirβTRUEif this is a write to the sysctl file. so like, are we writing or are we reading πbufferβ the user buffer. the actual data lives here πlenpβ the size of the user buffer πpposβ the current position in the file. where are we in the story rn π
π DESCRIPTION π
okay so here's what it actually does β it reads/writes up to table->maxlen/sizeof(unsigned int) integer values from/to the user buffer, and the whole thing is treated as an ASCII string. periodt. π
and then the cute part: the values read are assumed to be in 1/1000 seconds, and are converted into jiffies. so you hand it milliseconds, it gives you jiffies, everybody slays. π₯
returns 0 on success. that's it, that's the win β¨
ngl the msβjiffies conversion is the entire main character energy of this function, so don't sleep on it π
π SEE ALSO π
- Kernel file
./kernel/time/jiffies.cβ literally the source of truth, go look π proc_dointvec_jiffies(9)β the sibling that skips the millisecond era π¦proc_dointvec_userhz_jiffies(9)β same energy but in user HZ πΈproc_doulongvec_ms_jiffies_minmax(9)β theunsigned longcousin with minmax added in π
and that's the tea, bestie π this page lives in ./kernel/time, dated October 2026 β mwah, go forth and convert your milliseconds π§πβ
π¦ 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