STRUCT PMT_EVENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct pmt_event(9) πŸ¦‹

okay so real talk, this is a page from the Kernel API Manual and it's all about struct pmt_event β€” literally just a telemetry event, bestie. that's the whole vibe. it's a lil struct that tells you about a telemetry event, and honestly? iconic of it. πŸ’…


✨ SYNOPSIS ✨

here's the whole thing, no cap, character for character:

struct pmt_event {
    enum resctrl_event_id   id;
    unsigned int            idx;
    unsigned int            bin_bits;
 };

that's it. that's the struct. three members, zero drama. πŸŽ€


🌸 Members 🌸

okay so let's meet the cast, one member at a time, because each one is kind of a main character in their own way:

  • id β€” the resctrl event id. this is the "which event even is this" field, iykyk. πŸ†”
  • idx β€” the counter index within each per-RMID block of counters. yes, per-RMID, say it with me. it's the little position marker inside each block. πŸ“
  • bin_bits β€” here's the tea: this one is zero for integer valued events, and otherwise it's the number of bits in the fraction part of the fixed-point representation. so like, zero = plain integer vibes, nonzero = fixed-point fraction bits. math slay. πŸ”’βœ¨
fr fr, don't mix those up β€” bin_bits being 0 is a special case meaning "integer valued event", not just "no bits, lol". 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./arch/x86/kernel/cpu/resctrl/intel_aet.c
  • struct event_group(9)

go read those next, bestie, they're right there in the source tree. 🌈


and that's the whole page!! no notes, she ate. πŸ’–

⭐ cute lil sign-off: this one lives under ./arch/x86/kernel/cpu/resctrl and the date on the tin is October 2026 β€” so yeah, mark your calendar, periodt. πŸ“…πŸŽ€

πŸ“¦ where this page comes from