[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34dfe97d-3aa0-4fc5-8f1d-3da5066a0b6c@intel.com>
Date: Tue, 9 Dec 2025 11:39:56 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.com>, "Maciej
Wieczor-Retman" <maciej.wieczor-retman@...el.com>, Peter Newman
<peternewman@...gle.com>, James Morse <james.morse@....com>, Babu Moger
<babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, Dave Martin
<Dave.Martin@....com>, Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<patches@...ts.linux.dev>
Subject: Re: [PATCH v15 11/32] x86,fs/resctrl: Handle events that can be read
from any CPU
Hi Tony,
On 12/4/25 12:53 PM, Tony Luck wrote:
> resctrl assumes that monitor events can only be read from a CPU in the
> cpumask_t set of each domain. This is true for x86 events accessed with an
> MSR interface, but may not be true for other access methods such as MMIO.
>
> Introduce and use flag mon_evt::any_cpu, settable by architecture, that
> indicates there are no restrictions on which CPU can read that event.
I propose to append (something like): "This flag is not supported by the L3
event reading that requires to be run on a CPU that belongs to the L3
domain of the event being read."
> diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
> index 340b847ab397..081ff659b52c 100644
> --- a/fs/resctrl/monitor.c
> +++ b/fs/resctrl/monitor.c
> @@ -518,10 +518,12 @@ static int __mon_event_count(struct rdtgroup *rdtgrp, struct rmid_read *rr)
> {
> switch (rr->r->rid) {
> case RDT_RESOURCE_L3:
> - if (rr->hdr)
> + if (rr->hdr) {
> + WARN_ON_ONCE(rr->evt->any_cpu);
I appreciate that this addresses the feedback from v13 but it needs to be adjusted for the
code changes made since then. This means that this warning applies to both
__l3_mon_event_count() and __l3_mon_event_count_sum() , no?
> return __l3_mon_event_count(rdtgrp, rr);
> - else
> + } else {
> return __l3_mon_event_count_sum(rdtgrp, rr);
> + }
> default:
> rr->err = -EINVAL;
> return -EINVAL;
Reinette
Powered by blists - more mailing lists