STRUCT PREV_CPUTIME(9)
πΈ struct prev_cputime(9) πΈ
okay so bestie, welcome to the struct prev_cputime(9) page from the Kernel API Manual β yes the whole thing is literally named after the struct, iconic behavior honestly π
β¨ NAME β¨
struct prev_cputime β a little snapshot of system and user cputime, no cap π«Ά
π¦ SYNOPSIS π¦
struct prev_cputime {
#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE;
u64 utime;
u64 stime;
raw_spinlock_t lock;
#endif;
};
likeβ¦ look at her go π she's so simple and so powerful at the same time.
π Members π
utimeβ the time spent in user mode π that's the vibes hours, bestiestimeβ the time spent in system mode π₯ kernel grindset hours fr frlockβ protects the above two fields π«Ά it's giving bodyguard energy, and honestly? we love a protective icon
π Description π
So what does she do? She stores previous user/system time values such that we can guarantee monotonicity. periodt. β
lowkey the whole point: monotonicity stays guaranteed. do not come for her, she has one job and she ate π
π SEE ALSO π
Kernel file ./include/linux/sched.h plus these little friends:
__task_lazy_mmu_mode_active(9)is_lazy_mmu_mode_active(9)set_cpus_allowed_ptr(9)task_nice(9)is_idle_task(9)
go read them, iykyk π§
that's the whole page babes π this one lives in ./include/linux, it's dated October 2026, and yeah β it's struct prev_cputime(9) herself, signing off π
β¨π
π¦ 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