STRUCT RAPL_IF_PRIV(9)
πΈ struct rapl_if_priv(9) πΈ
okay so this is from the Kernel API Manual β it's the page for struct rapl_if_priv, and it's literally just the private-data holder for the different RAPL interfaces. like, the little backpack each interface carries its own stuff in π
β¨ NAME β¨
struct rapl_if_priv β private data for different RAPL interfaces π«Ά
π SYNOPSIS π
struct rapl_if_priv {
enum rapl_if_type type;
struct powercap_control_type *control_type;
enum cpuhp_state pcap_rapl_online;
union rapl_reg reg_unit;
union rapl_reg regs[RAPL_DOMAIN_MAX][RAPL_DOMAIN_REG_MAX];
int limits[RAPL_DOMAIN_MAX];
int (*read_raw)(int id, struct reg_action *ra, bool pmu_ctx);
int (*write_raw)(int id, struct reg_action *ra);
const struct rapl_defaults *defaults;
struct rapl_primitive_info *rpi;
};
no cap, that's the whole shape of it π
π¦ Members π¦
control_typeβ bestie, every single RAPL interface has to have its own powercap control type. no sharing, no borrowing, that one's yours πpcap_rapl_onlineβ the CPU hotplug state, one for each RAPL interface πreg_unitβ the register you go to when you need the energy/power/time unit. it's giving "conversion rate source of truth" fr fr βregsβ the register sets for the different RAPL Domains. like a lil wardrobe, one outfit per domain πlimitsβ how many power limits each domain supports, as a number, plain and simple π₯read_rawβ the callback for reading RAPL interface specific registers. it's a function pointer:int (*read_raw)(int id, struct reg_action *ra, bool pmu_ctx)πwrite_rawβ the callback for writing RAPL interface specific registers. also a function pointer:int (*write_raw)(int id, struct reg_action *ra)πΈdefaultsβ pointer to default settings. the fallback vibes β¨rpiβ pointer to interface primitive info. iykyk π§
oh and don't forget βtypeis sitting right there in the struct too (it's anenum rapl_if_type), it just doesn't get its own little paragraph down here π
π SEE ALSO π
- Kernel file
./include/linux/intel_rapl.h struct rapl_package_pmu_data(9)β go read that one next bestie, it's connected π«
okay that's the whole page, mwah π β this gem lives in ./include/linux, dated October 2026, and it's filed under struct rapl_if_priv(9). go slay your RAPL interface setup, you've got this π«Άπ
π¦ 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