STRUCT RAPL_PACKAGE_PMU_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct rapl_package_pmu_data(9) β€” Kernel API Manual

okay so bestie, welcome to struct rapl_package_pmu_data(9), straight out of the Kernel API Manual ✨. This is the per-package data for PMU support β€” think of it as the little backstage dressing room where one RAPL package keeps all its PMU stuff. Very main character energy, honestly πŸŽ€.


✨ NAME ✨

struct rapl_package_pmu_data β€” Per package data for PMU support. that's it, that's the vibe 🫢


🌸 SYNOPSIS 🌸

struct rapl_package_pmu_data {
        u64 scale[RAPL_DOMAIN_MAX];
        raw_spinlock_t lock;
        int n_active;
        struct list_head active_list;
        ktime_t timer_interval;
        struct hrtimer hrtimer;
 };

no cap, that's the whole struct. look at her. iconic πŸ‘‘


πŸ¦‹ Members πŸ¦‹

  • scale β€” the scale of 2^-32 Joules for each energy counter increase. so every time a counter ticks up, this lil number tells you how much actual juice that tick is worth, in Joules, scaled by 2^-32 πŸ”₯
  • lock β€” a raw_spinlock_t that protects n_active and active_list. it's giving bodyguard energy, lowkey πŸ’ͺ
  • n_active β€” the number of active events. just a count, doing its best 😌
  • active_list β€” the list of active events. a struct list_head, keeping everyone in line ✨
  • timer_interval β€” the maximum timer expiration time before counter overflow. basically the deadline you cannot sleep past, or the counter goes πŸ’€
  • hrtimer β€” periodically updates the counter to prevent overflow. your girl is out here refreshing on a schedule so nothing spills over, we stan a proactive queen πŸ•πŸ‘‘

πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./include/linux/intel_rapl.h
  • struct rapl_if_priv(9)

go read those too, iykyk 🌈


ngl bestie, treat timer_interval and hrtimer with respect β€” the whole point is that the counter gets updated before it overflows. miss that window and things go sideways, and not in a cute way 😭

and that's the page, fr fr πŸ“ this one lives in ./include/linux, and the page date is October 2026 β€” mwah, go forth and read headers πŸ’œπŸ§š

πŸ“¦ where this page comes from