From: Babu Moger <babu.moger@amd.com>
To: <babu.moger@amd.com>, <tony.luck@intel.com>,
<reinette.chatre@intel.com>, <bp@alien8.de>
Cc: <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: [PATCH v2 0/3] x86/resctrl: Keep default MBM mode at boot and fix ABMC
Date: Fri, 4 Sep 2026 13:06:09 -0500 [thread overview]
Message-ID: <cover.1788545152.git.babu.moger@amd.com> (raw)
Hi All,
This series restores default MBM assignment mode at boot, assigns counters
when switching to mbm_event, and fixes ABMC programming for more than 32
counters.
Commit 0f1576e43adc ("x86/resctrl: Configure mbm_event mode if supported")
enabled ABMC at boot. That breaks userspace that assumes default mode,
notably pqos from intel-cmt-cat [1]. pqos creates 16 or more groups (two
counters each) and exhausts a 32-counter pool, so further groups report
zero bandwidth.
mbm_event remains available as an opt-in for snapshot/rotation when there
are more groups than counters. Default mode can monitor more groups on
current AMD platforms, but there is a known issue with default mode when
monitoring more groups. It is documented now.
Patch 1: encode the full ABMC counter range in L3_QOS_ABMC_CFG (cntr_id
was 5 bits), expand bw_src, and use u64 to avoid 32-bit truncation.
The APM [2] at [3] will be updated for the expanded fields.
Patch 2: when switching to mbm_event, assign counters to existing
groups, including the default group, matching mkdir auto-assignment.
Patch 3: leave mbm_assign_mode as default at boot.
Based on tip/master:
461735aa6e8e Merge branch into tip/master: 'x86/bugs'
[1] https://github.com/intel/intel-cmt-cat/issues/311
[2] AMD64 Architecture Programmer's Manual Volume 2: System Programming,
Publication #24593, Revision 3.41, Section 19.3.3.3 "Assignable
Bandwidth Monitoring (ABMC)"
[3] https://bugzilla.kernel.org/show_bug.cgi?id=206537
v2:
- Added patch 2 to address Sashiko's comment regarding the documentation issue.
In fact, it exposed a real issue. When switching to mbm_event mode, existing
monitoring groups should be assigned counters whenever counters are available.
This provides a smooth transition between modes and aligns the behavior with
the existing auto-assignment mechanism.
https://sashiko.dev/#/patchset/8cb66e18e32e4087a9712c1e68ee6da614efe244.1784322818.git.babu.moger%40amd.com
- Combine the two v1 patches and add patch 2 (assign existing groups
on mbm_event switch; Sashiko review).
- Keep boot-default separate from the encoding/truncation fixes.
- Document the default-mode counter-pool limitation.
v1:
https://lore.kernel.org/lkml/980f39d3a0e0d9f73925e362f835aeef070a1bc5.1784322818.git.babu.moger@amd.com/
Thanks
Babu Moger
Babu Moger (3):
x86/resctrl: Fix ABMC counter programming for extended counter ranges
fs/resctrl: Assign counters to existing groups when enabling mbm_event
x86/resctrl: Keep mbm_assign_mode in default mode at boot
Documentation/filesystems/resctrl.rst | 86 ++++++++++++++++----------
arch/x86/kernel/cpu/resctrl/internal.h | 18 +++---
arch/x86/kernel/cpu/resctrl/monitor.c | 1 -
fs/resctrl/monitor.c | 30 ++++++++-
4 files changed, 89 insertions(+), 46 deletions(-)
--
2.43.0
next reply other threads:[~2026-09-04 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 18:06 Babu Moger [this message]
2026-09-04 18:06 ` [PATCH v2 1/3] x86/resctrl: Fix ABMC counter programming for extended counter ranges Babu Moger
2026-09-04 18:06 ` [PATCH v2 2/3] fs/resctrl: Assign counters to existing groups when enabling mbm_event Babu Moger
2026-09-04 18:06 ` [PATCH v2 3/3] x86/resctrl: Keep mbm_assign_mode in default mode at boot 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=cover.1788545152.git.babu.moger@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
all inboxes | Powered by JetHome®