STRUCT PREV_CPUTIME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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, bestie
  • stime β€” the time spent in system mode πŸ”₯ kernel grindset hours fr fr
  • lock β€” 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:

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