arch/x86/kernel/cpu/resctrl/intel_aet.c
Source file repositories/reference/linux-study-clean/arch/x86/kernel/cpu/resctrl/intel_aet.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/kernel/cpu/resctrl/intel_aet.c- Extension
.c- Size
- 10902 bytes
- Lines
- 410
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/compiler_types.hlinux/container_of.hlinux/cpumask.hlinux/err.hlinux/errno.hlinux/gfp_types.hlinux/init.hlinux/intel_pmt_features.hlinux/intel_vsec.hlinux/io.hlinux/minmax.hlinux/printk.hlinux/rculist.hlinux/rcupdate.hlinux/resctrl.hlinux/resctrl_types.hlinux/slab.hlinux/stddef.hlinux/topology.hlinux/types.hinternal.h
Detected Declarations
struct pmt_eventstruct event_groupfunction intel_handle_aet_optionfunction for_each_event_groupfunction skip_telem_regionfunction group_has_usable_regionsfunction all_regions_have_sufficient_rmidfunction enable_eventsfunction lookup_pfidfunction intel_aet_get_eventsfunction for_each_event_groupfunction intel_aet_exitfunction for_each_event_groupfunction domainfunction intel_aet_mon_domain_setup
Annotated Snippet
struct pmt_event {
enum resctrl_event_id id;
unsigned int idx;
unsigned int bin_bits;
};
#define EVT(_id, _idx, _bits) { .id = _id, .idx = _idx, .bin_bits = _bits }
/**
* struct event_group - Events with the same feature type ("energy" or "perf") and GUID.
* @pfname: PMT feature name ("energy" or "perf") of this event group.
* Used by boot rdt= option.
* @pfg: Points to the aggregated telemetry space information
* returned by the intel_pmt_get_regions_by_feature()
* call to the INTEL_PMT_TELEMETRY driver that contains
* data for all telemetry regions of type @pfname.
* Valid if the system supports the event group,
* NULL otherwise.
* @force_off: True when "rdt" command line or architecture code disables
* this event group due to insufficient RMIDs.
* @force_on: True when "rdt" command line overrides disable of this
* event group.
* @guid: Unique number per XML description file.
* @num_rmid: Number of RMIDs supported by this group. May be
* adjusted downwards if enumeration from
* intel_pmt_get_regions_by_feature() indicates fewer
* RMIDs can be tracked simultaneously.
* @mmio_size: Number of bytes of MMIO registers for this group.
* @num_events: Number of events in this group.
* @evts: Array of event descriptors.
*/
struct event_group {
/* Data fields for additional structures to manage this group. */
const char *pfname;
struct pmt_feature_group *pfg;
bool force_off, force_on;
/* Remaining fields initialized from XML file. */
u32 guid;
u32 num_rmid;
size_t mmio_size;
unsigned int num_events;
struct pmt_event evts[] __counted_by(num_events);
};
#define XML_MMIO_SIZE(num_rmids, num_events, num_extra_status) \
(((num_rmids) * (num_events) + (num_extra_status)) * sizeof(u64))
/*
* Link: https://github.com/intel/Intel-PMT/blob/main/xml/CWF/OOBMSM/RMID-ENERGY/cwf_aggregator.xml
*/
static struct event_group energy_0x26696143 = {
.pfname = "energy",
.guid = 0x26696143,
.num_rmid = 576,
.mmio_size = XML_MMIO_SIZE(576, 2, 3),
.num_events = 2,
.evts = {
EVT(PMT_EVENT_ENERGY, 0, 18),
EVT(PMT_EVENT_ACTIVITY, 1, 18),
}
};
/*
* Link: https://github.com/intel/Intel-PMT/blob/main/xml/CWF/OOBMSM/RMID-PERF/cwf_aggregator.xml
*/
static struct event_group perf_0x26557651 = {
.pfname = "perf",
.guid = 0x26557651,
.num_rmid = 576,
.mmio_size = XML_MMIO_SIZE(576, 7, 3),
.num_events = 7,
.evts = {
EVT(PMT_EVENT_STALLS_LLC_HIT, 0, 0),
EVT(PMT_EVENT_C1_RES, 1, 0),
EVT(PMT_EVENT_UNHALTED_CORE_CYCLES, 2, 0),
EVT(PMT_EVENT_STALLS_LLC_MISS, 3, 0),
EVT(PMT_EVENT_AUTO_C6_RES, 4, 0),
EVT(PMT_EVENT_UNHALTED_REF_CYCLES, 5, 0),
EVT(PMT_EVENT_UOPS_RETIRED, 6, 0),
}
};
static struct event_group *known_event_groups[] = {
&energy_0x26696143,
&perf_0x26557651,
};
#define for_each_event_group(_peg) \
for (_peg = known_event_groups; \
Annotation
- Immediate include surface: `linux/bits.h`, `linux/compiler_types.h`, `linux/container_of.h`, `linux/cpumask.h`, `linux/err.h`, `linux/errno.h`, `linux/gfp_types.h`, `linux/init.h`.
- Detected declarations: `struct pmt_event`, `struct event_group`, `function intel_handle_aet_option`, `function for_each_event_group`, `function skip_telem_region`, `function group_has_usable_regions`, `function all_regions_have_sufficient_rmid`, `function enable_events`, `function lookup_pfid`, `function intel_aet_get_events`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.