From: Babu Moger <babu.moger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
tony.luck@intel.com, bp@alien8.de
Cc: x86@kernel.org, Dave.Martin@arm.com, james.morse@arm.com,
corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
tglx@kernel.org, mingo@redhat.com, dave.hansen@linux.intel.com,
hpa@zytor.com, kas@kernel.org, rick.p.edgecombe@intel.com,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-coco@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [PATCH v6 2/2] x86,fs/resctrl: Keep mbm_assign_mode in default mode at boot
Date: Mon, 2 Nov 2026 13:54:14 -0600 [thread overview]
Message-ID: <4d7fed02-5ec9-49b9-bc52-83571fd368c7@amd.com> (raw)
In-Reply-To: <3ebc7028-c559-4add-800a-614b29d66ba3@intel.com>
Hi Reinette,
On 10/30/26 17:08, Reinette Chatre wrote:
> Hi Babu,
>
> On 10/30/26 1:28 PM, Babu Moger wrote:
>> The mbm_event mode assigns hardware MBM counters to RMID/event pairs.
>> It is intended for deployments that need to manage counter assignment
>> on platforms where the number of monitoring groups exceeds the available
>> hardware counters. Hardware counters are scarce on these platforms, so
>> mbm_event mode suits workflows that monitor a subset of groups at a time
>> and rotate assignments as needed.
>>
>> x86 resctrl enables the mbm_event mode by default on hardware that supports
>> it. This breaks the pqos tool [1], which assumes the historical default
>> mode. It creates 16 or more monitoring groups and uses two counters per
>> group. On a platform with 32 counters per domain, that exhausts the
>> mbm_event counters pool, causing additional groups to read "Unassigned".
>> pqos interprets a non-numeric event read as zero bandwidth and reports 0
>> MB/s for those groups:
>>
>> $ sudo pqos -m all:0-4
>> CORE IPC MISSES LLC[KB] MBL[MB/s] MBR[MB/s]
>> 0 0.69 16k 192.0 0.0 0.0
>> 1 0.40 3k 0.0 0.0 0.0
>> 2 0.44 1k 64.0 0.0 0.0
>> 3 0.39 1k 64.0 0.0 0.0
>> 4 0.43 1k 0.0 0.0 0.0
>>
>> Leave mbm_assign_mode in default mode during initialization. Default mode
>> uses one counter per monitoring group. On existing AMD platforms, the
>> default active counters pool is 64 and may be larger on newer hardware.
>> The active counters pool is the number of counters that the hardware can
>> actively track in default mode.
>>
>> Deployments within the active counters pool receive accurate bandwidth
>> measurements in the default mode. Users can create more monitoring groups
>> (for example, 4096 on current hardware) than there are active counters in
>> the pool. Beyond that pool, readings may be misleading or report as
>> "Unavailable", with no user-visible indication.
>>
>> Default mode is still limited once the number of monitoring groups exceeds
>> that active counters pool. After hardware re-allocates a counter, a read
>> may return "Unavailable". pqos still treats "Unavailable" as zero.
>> Successive reads can be a count, "Unavailable", then another count. pqos
>> treats those jumps as wraparound and can report an inconsistent rate:
>>
>> $ sudo pqos -m all:0-4
>> CORE IPC MISSES LLC[KB] MBL[MB/s] MBR[MB/s]
>> 0 0.76 60k 32.0 0.0 0.0
>> 1 0.45 1k 32.0 0.0 0.0
>> 2 1.57 107k 64.0 0.0 17592186044184.9
>> 3 1.62 276k 4928.0 3.2 0.5
>>
>> Users that need stable measurements beyond the active counters pool should
>> use mbm_event mode and rotate assignments as needed. Enable it with:
>>
>> # echo mbm_event > /sys/fs/resctrl/info/L3_MON/mbm_assign_mode
>>
>> Fixes: 0f1576e43adc ("x86/resctrl: Configure mbm_event mode if supported")
>> Closes: https://github.com/intel/intel-cmt-cat/issues/311
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> Cc: stable@vger.kernel.org
>> Link: https://github.com/intel/intel-cmt-cat # [1]
>> ---
>
> To help future readers understand how we landed on this I think it may be useful
> to add a link to the decision that resulted in this fix. For example:
Looks like Boris is taking care of adding the below text.
>
> ...
> Leave mbm_assign_mode in default mode during initialization as decided in [2].
> ...
> Link: https://lore.kernel.org/20260804191608.GDanI6eK2Q07w6pNcb@fat_crate.local # [2]
>
> | Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
>
Thank you.
Babu
prev parent reply other threads:[~2026-11-02 19:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 20:28 [PATCH v6 0/2] x86,fs/resctrl: Keep default MBM mode at boot and fix ABMC programming Babu Moger
2026-10-30 20:28 ` [PATCH v6 1/2] x86/resctrl: Fix ABMC counter programming Babu Moger
2026-11-02 23:09 ` [tip: x86/urgent] x86/resctrl: Correct ABMC counter ID field width tip-bot2 for Babu Moger
2026-10-30 20:28 ` [PATCH v6 2/2] x86,fs/resctrl: Keep mbm_assign_mode in default mode at boot Babu Moger
2026-10-30 22:08 ` Reinette Chatre
2026-10-31 1:07 ` Borislav Petkov
2026-11-02 16:01 ` Reinette Chatre
2026-11-02 19:54 ` Babu Moger [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=4d7fed02-5ec9-49b9-bc52-83571fd368c7@amd.com \
--to=babu.moger@amd.com \
--cc=Dave.Martin@arm.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=rick.p.edgecombe@intel.com \
--cc=skhan@linuxfoundation.org \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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®