Linux Documentation
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Moger, Babu" <bmoger@amd.com>, Babu Moger <babu.moger@amd.com>,
	<tony.luck@intel.com>, <x86@kernel.org>, <Dave.Martin@arm.com>,
	<james.morse@arm.com>, <corbet@lwn.net>,
	<skhan@linuxfoundation.org>, <tglx@kernel.org>,
	<mingo@redhat.com>, <dave.hansen@linux.intel.com>,
	<hpa@zytor.com>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>, <eranian@google.com>,
	<peternewman@google.com>
Subject: Re: [PATCH 1/2] x86/resctrl, Documentation: Keep mbm_assign_mode "default" on boot
Date: Mon, 27 Jul 2026 08:25:30 -0700	[thread overview]
Message-ID: <119188c4-1127-4155-9a05-dff47e25be85@intel.com> (raw)
In-Reply-To: <20260727140539.GAamdls0q_W0zUmhqw@fat_crate.local>

Hi Boris and Babu,

On 7/27/26 7:05 AM, Borislav Petkov wrote:
> On Fri, Jul 24, 2026 at 04:53:26PM -0700, Reinette Chatre wrote:
>> One clarification here is that as I understand there has not yet been
>> an actual user complaint. At least not that the pqos utility mentioned in
>> this thread is aware of. Instead I struggle with the speculation about possible
>> user complaints with different interpretations on how this change could be
>> perceived by users. 
> 
> Sure, but don't you think that it is enough that we know about it?

Only if we are sure that we have the complete picture. I do not believe we do, yet.

I connected with the friendly pqos folks on this issue. They subsequently did an audit of
the tool to understand how it may behave under the different scenarios. They found that
the tool currently parses text return values ("Unavailable", "Unassigned") as zero.
This could cause incorrect behavior. (more below)

> 
> I mean, the pqos tool shows 0.0 in the MBL/MBR columns now.
> 
> And is the 
> 
>   pqos -m all:[0-191]
> 
> invocation not something people would usually run?

ABMC enabled (mode claimed to be incompatible with pqos)
--------------------------------------------------------
This example is from Babu's email that highlights that when ABMC is enabled this returns
zero as bandwidth from pqos perspective. This matches the pqos audit that found with text return
states, like the "Unassigned" happening underneath the output above, the return value is zero. When
the counters are not assigned then the events will always return "Unassigned" (until reassigned)
so having it return zero all the time may not cause issues. Once reassigned the event value
will always return a valid value (no text return values).

ABMC disabled (mode claimed to be compatible with pqos)
-------------------------------------------------------
Without ABMC there are scenarios when events may return "Unavailable". These scenarios vary
based on how many monitor groups are created and the workloads run. I am not able to test this
but when I attempt to combine what I know about AMD bandwidth monitoring with the results from
the pqos audit I am concerned that there may be a problem.

Consider a scenario where an event may return "Unavailable", for example:

<return A>, <return "Unavailable">, <return B (larger than A)>, <return "Unavailable">, ...

pqos will see:
A, 0, B, 0, ...

The "pqos -m" usage attempts to determine the bandwidth rate and, for example, when going from
"A" to "0" it will be considered counter wraparound that would appear as a very large and
wrong bandwidth number.


Question to Babu
----------------
Do you perhaps have a test/workloads that, under "default" counter assignment mode, can create
many monitor groups (more than 64) and cause "Unavailable" to be returned frequently? Would it
be possible to put pqos through its paces in this environment?

Of course, "AMBC disabled" scenario also includes AMD systems before ABMC was introduced. I do
not know why the issue with "Unavailable" handling (text returns in general) has not been reported
until now. I assume the pqos team may do most testing on Intel systems that do not return text.

>> When considering a change like this, should it be a stable candidate to
>> help reduce the number of kernels with different behaviors?
> 
> Yeah. It needs to be minimal too for easier backporting.

ack.

> 
>> The patch notes mention that this change is planned to be reverted at some
>> point in the future and I have not heard of any changes to this plan.
> 
> Where does it say that? I don't see that aspect.

For convenience, copy of patch notes from original commit [1] is below:

	There are plans to enable "mbm_event" by default once additional counters
	are available. For now, keep the default mode to maintain compatibility
	with existing tools.

Reinette

[1] https://lore.kernel.org/lkml/8cb66e18e32e4087a9712c1e68ee6da614efe244.1784322818.git.babu.moger@amd.com/



  reply	other threads:[~2026-07-27 15:25 UTC|newest]

Thread overview: 20+ 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 [this message]
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-20 20:12 ` Babu Moger

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=119188c4-1127-4155-9a05-dff47e25be85@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=bmoger@amd.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=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