From: Babu Moger <babu.moger@amd.com>
To: "Luck, Tony" <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>
Cc: "Chatre, Reinette" <reinette.chatre@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"Dave.Martin@arm.com" <Dave.Martin@arm.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"skhan@linuxfoundation.org" <skhan@linuxfoundation.org>,
"tglx@kernel.org" <tglx@kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"Eranian, Stephane" <eranian@google.com>,
"peternewman@google.com" <peternewman@google.com>
Subject: Re: RE: [PATCH 1/2] x86/resctrl, Documentation: Keep mbm_assign_mode "default" on boot
Date: Tue, 28 Jul 2026 15:18:26 -0500 [thread overview]
Message-ID: <73737438-01ed-437e-846a-5aa8bd687462@amd.com> (raw)
In-Reply-To: <SJ1PR11MB6083636E406ABF9F64CE3F25FCCB2@SJ1PR11MB6083.namprd11.prod.outlook.com>
Hi Tony,
On 7/28/26 14:58, Luck, Tony wrote:
>> ABMC mode (also referred to as mbm_event mode) relies on ABMC counters,
>> and this system provides only 32 such counters.
>>
>> By comparison, the default mode uses RMIDs, with up to 4096 RMIDs
>> available. However, even though the RMID space is much larger, the
>> hardware can track only 64 RMIDs concurrently. As a result, if pqos
>> attempts to monitor more than 64 groups, the reported bandwidth
>> measurements may become inaccurate.
>>
>> That said, I have not been able to reproduce any bandwidth inaccuracies
>> on the systems I tested. My point is that this may not be a significant
>> issue for the vast majority of users
>
> How did you try to reproduce? It seems that it should be trivial to create
> more than 64 monitor groups with active tasks assigned to each group.
> That ought to show the issue quickly.
I started "pqos -m" to create 256 monitoring threads. It did not happen
in this case.
Reinette has already instrumented the kernel to force the issue. So, we
know the issue can happen.
>
> What does happen when I'm reading the memory bandwidth from a
> monitor group and the underlying counter for that RMID is stolen for
> use by another group, and then later this group steals a counter from
> someone else?
>
> I'm expecting "Unavailable" while there is no counter. But I'm not sure
> what happens when a counter is reacquired.
>
> 1) Does it start over from zero?
> Seems a sane option.
> 2) Or does the monitor group see whatever the counter was at
> when being used by some other group?
> Seems less sane.
As per this code, it should start over from 0.
} else if (ret == -EINVAL) {
am = get_arch_mbm_state(hw_dom, rmid, eventid);
if (am)
am->prev_msr = 0;
}
Thanks
Babu
next prev parent reply other threads:[~2026-07-28 20:18 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 21:13 [PATCH 1/2] x86/resctrl, Documentation: Keep mbm_assign_mode "default" on boot Babu Moger
2026-07-17 21:13 ` [PATCH 2/2] x86/resctrl: Fix ABMC counter programming for extended counter ranges Babu Moger
2026-07-17 22:56 ` [PATCH 1/2] x86/resctrl, Documentation: Keep mbm_assign_mode "default" on boot Reinette Chatre
2026-07-20 17:00 ` Babu Moger
2026-07-20 18:27 ` Reinette Chatre
2026-07-20 19:15 ` Babu Moger
2026-07-21 20:54 ` Reinette Chatre
2026-07-23 18:03 ` Babu Moger
2026-07-23 21:46 ` Reinette Chatre
2026-07-24 20:57 ` Moger, Babu
2026-07-24 22:28 ` Reinette Chatre
2026-07-24 23:12 ` Borislav Petkov
2026-07-24 23:53 ` Reinette Chatre
2026-07-27 14:05 ` Borislav Petkov
2026-07-27 15:25 ` Reinette Chatre
2026-07-27 17:24 ` Babu Moger
2026-07-27 18:12 ` Reinette Chatre
2026-07-27 20:17 ` Babu Moger
2026-07-27 21:42 ` Reinette Chatre
2026-07-27 22:44 ` Moger, Babu
2026-07-27 23:29 ` Moger, Babu
2026-07-28 0:29 ` Reinette Chatre
2026-07-28 17:04 ` Borislav Petkov
2026-07-28 17:25 ` Babu Moger
2026-07-20 20:12 ` Babu Moger
2026-07-28 19:18 ` Borislav Petkov
2026-07-28 19:46 ` Babu Moger
2026-07-28 19:58 ` Luck, Tony
2026-07-28 20:18 ` Babu Moger [this message]
2026-07-28 20:24 ` Luck, Tony
2026-07-28 20:43 ` Babu Moger
2026-07-28 21:58 ` Reinette Chatre
2026-07-28 22:20 ` Moger, Babu
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=73737438-01ed-437e-846a-5aa8bd687462@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=eranian@google.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peternewman@google.com \
--cc=reinette.chatre@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