[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTiIe6U6e5PlEyj5@agluck-desk3>
Date: Tue, 9 Dec 2025 12:37:15 -0800
From: "Luck, Tony" <tony.luck@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
CC: 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>, <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
On Tue, Dec 09, 2025 at 11:39:56AM -0800, Reinette Chatre wrote:
> 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."
Perahps simpler?
This flag is not supported for RDT_RESOURCE_L3 monitoring events.
>
> > 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?
I'l move the WARN_ON_ONCE() before the "if"
>
> > return __l3_mon_event_count(rdtgrp, rr);
> > - else
> > + } else {
> > return __l3_mon_event_count_sum(rdtgrp, rr);
> > + }
> > default:
> > rr->err = -EINVAL;
> > return -EINVAL;
>
> Reinette
-Tony
Powered by blists - more mailing lists