mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	<james.morse@arm.com>, <ben.horgan@arm.com>,
	<fenghuay@nvidia.com>, <catalin.marinas@arm.com>,
	<will@kernel.org>, <mark.rutland@arm.com>, <corbet@lwn.net>,
	<skhan@linuxfoundation.org>, <rdunlap@infradead.org>,
	<tony.luck@intel.com>, <Dave.Martin@arm.com>,
	<babu.moger@amd.com>, <tglx@kernel.org>, <mingo@redhat.com>,
	<bp@alien8.de>, <dave.hansen@linux.intel.com>, <hpa@zytor.com>,
	<tan.shaopeng@jp.fujitsu.com>, <jic23@kernel.org>,
	<zengheng4@huawei.com>, <gshan@redhat.com>, <x86@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>
Subject: Re: [RFC PATCH v2 00/19] resctrl: Generalize monitor events across resources
Date: Mon, 2 Nov 2026 11:23:57 +0800	[thread overview]
Message-ID: <9880eb24-2189-4592-a999-5769c59ebb81@huawei.com> (raw)
In-Reply-To: <d4a54429-7d45-4936-b5b3-06d8fa8545ee@intel.com>



在 2026/10/31 1:09, Reinette Chatre 写道:
> Hi Jinjie,
> 
> On 10/29/26 5:35 AM, Jinjie Ruan wrote:
>> Resctrl only knows about monitoring at the L3 scope. MPAM monitors are
>> attached to a resource in an MSC, and firmware says which cache level that
>> resource is. The driver already finds L2 monitors, but resctrl has
>> nowhere to show them.
>>
>> This is not MPAM specific. RISC-V can also place monitors at several
>> points in the system.
>>
> 
> One key to this is in the first sentence of this cover letter: "Resctrl only knows
> about monitoring at the L3 *scope*.".
> 
> When it comes to exposing monitoring data to user space resctrl has been using "L3"
> interchangeable as resource and scope. 
> 
> The existing resctrl user interface already establishes that the "L3" in
> "L3_MON" and the per monitor group "mon_data/mon_L3_xx" refers to the L3 *scope*,
> not the L3 resource. More specifically, consider the existing user interface:

Hi Reinette,

Thanks for your explanation, you are right, the "L3" in "L3_MON" and
"mon_L3_xx" is the scope, not the resource, this interface can include
different resources such as MB and L3 at the same time..

> 
> # find mon_data/
> mon_data/
> mon_data/mon_L3_00
> mon_data/mon_L3_00/mbm_local_bytes <=== monitoring data associated with MB resource at L3 scope
> mon_data/mon_L3_00/mbm_total_bytes <=== monitoring data associated with MB resource at L3 scope
> mon_data/mon_L3_00/llc_occupancy   <=== monitoring data associated with L3 resource at L3 scope
> 
> Associating the monitor events with the L3 resource was an implementation choice
> that was convenient at the time. Since L2 can similarly be used interchangeably for resource
> and scope associating the L2 scope monitoring with the L2 resource may similarly be convenient
> when considering how to support L2 monitors as is done in this series.

L2 works here only because the names happen to be the same for resource
and scope as L3 has done.

> 
> Even so, I do not believe that associating monitoring with the resource will be
> able to cleanly support all MPAM monitoring capability. Specifically the upcoming CPU-less
> memory bandwidth monitoring.
> 
> As I see the plan at this time: CPU-less memory bandwidth allocation will be
> backed by a new MB_NODE resource. For these systems the expectation is that their
> monitoring data will be exposed to user space via NODE scope and will appear to user space as:
> 
> mon_data/
> mon_data/mon_NODE_00
> mon_data/mon_NODE_00/mbm_total_bytes <=== monitoring data associated with MB resource at NODE scope

You are righ, associating monitoring with the resource cannot give
mon_NODE_00 but mon_MB_xx. I am happy to key it off scope instead for
naming and display, and keep the resource-based event tables as an
internal detail.

> 
> The cover-letter is titled "Generalize monitor events across resources". As I see it such
> generalization does not prepare resctrl for all MPAM monitoring capabilities. Could this
> work do so?

CPU-less NODE monitoring is not part of this series, but I will make
sure the scope-based naming does not block it.

> 
> Reinette

-- 
Best regards,
Jinjie


      reply	other threads:[~2026-11-02  3:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 12:35 Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 01/19] arm_mpam: resctrl: Leave CDP off when there are too few PARTIDs Jinjie Ruan
2026-10-30 16:38   ` Ben Horgan
2026-10-31  2:24     ` Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 02/19] fs/resctrl: Generalize __l3_mon_event_count for non-L3 resources Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 03/19] fs/resctrl: Rename monitor events to drop the L3 prefix Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 04/19] x86/resctrl: Use the resource-agnostic monitor event names Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 05/19] arm_mpam: resctrl: " Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 06/19] resctrl: Remove the L3 " Jinjie Ruan
2026-10-29 12:35 ` [RFC PATCH v2 07/19] arm_mpam: resctrl: Index monitor state by resource and event Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 08/19] arm_mpam: resctrl: Halve the monitor counts of every resource on CDP Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 09/19] x86,fs/resctrl: Pass the resource to the monitor event helpers Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 10/19] fs/resctrl: Track monitor events per resource Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 11/19] fs/resctrl: Add the L2 monitor events Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 12/19] fs/resctrl: Set up MBM state and workers for every monitor resource Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 13/19] fs/resctrl: Check RMID limbo on every resource with occupancy Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 14/19] fs/resctrl: Manage assignable counters for every monitor resource Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 15/19] arm_mpam: resctrl: Look up the monitor domain id from the components Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 16/19] arm_mpam: resctrl: Report counter assignment per resource Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 17/19] arm_mpam: resctrl: Allow monitoring on resources other than the L3 Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 18/19] arm_mpam: resctrl: Expose the L2 monitor events Jinjie Ruan
2026-10-29 12:36 ` [RFC PATCH v2 19/19] Documentation: arm64: mpam: Describe " Jinjie Ruan
2026-10-30 17:09 ` [RFC PATCH v2 00/19] resctrl: Generalize monitor events across resources Reinette Chatre
2026-11-02  3:23   ` Jinjie Ruan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9880eb24-2189-4592-a999-5769c59ebb81@huawei.com \
    --to=ruanjinjie@huawei.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=gshan@redhat.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=reinette.chatre@intel.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tan.shaopeng@jp.fujitsu.com \
    --cc=tglx@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=zengheng4@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®