Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fs/resctrl: Split L3 dependent parts out of __mon_event_count()

Carve out the L3 resource specific event reading code into a separate helper
to support reading event data from a new monitoring resource.

Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/20251217172121.12030-1-tony.luck@intel.com

authored by

Tony Luck and committed by
Borislav Petkov (AMD)
ad5c2ff7 97fec06d

+12 -1
+12 -1
fs/resctrl/monitor.c
··· 413 413 memset(&d->cntr_cfg[cntr_id], 0, sizeof(*d->cntr_cfg)); 414 414 } 415 415 416 - static int __mon_event_count(struct rdtgroup *rdtgrp, struct rmid_read *rr) 416 + static int __l3_mon_event_count(struct rdtgroup *rdtgrp, struct rmid_read *rr) 417 417 { 418 418 int cpu = smp_processor_id(); 419 419 u32 closid = rdtgrp->closid; ··· 492 492 rr->err = ret; 493 493 494 494 return ret; 495 + } 496 + 497 + static int __mon_event_count(struct rdtgroup *rdtgrp, struct rmid_read *rr) 498 + { 499 + switch (rr->r->rid) { 500 + case RDT_RESOURCE_L3: 501 + return __l3_mon_event_count(rdtgrp, rr); 502 + default: 503 + rr->err = -EINVAL; 504 + return -EINVAL; 505 + } 495 506 } 496 507 497 508 /*