All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cheng <icheng@nvidia.com>
To: tony.luck@intel.com, reinette.chatre@intel.com, shuah@kernel.org,
	ben.horgan@arm.com, fenghuay@nvidia.com
Cc: x86@kernel.org, Dave.Martin@arm.com, james.morse@arm.com,
	babu.moger@amd.com, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, kaihengf@nvidia.com,
	kobak@nvidia.com, newtonl@nvidia.com, kristinc@nvidia.com,
	Richard Cheng <icheng@nvidia.com>
Subject: [PATCH v6 0/2] selftests/resctrl: Check the effect of the CBM in CMT test
Date: Sat, 14 Nov 2026 22:01:06 +0800	[thread overview]
Message-ID: <20261114140108.36954-1-icheng@nvidia.com> (raw)

Previous version [1] added cl_flush() and sb() for aarch64.
As discussed there this does not work on arm64, and Ben and
Reinette suggested to enhance the CMT test with a forgiving
check instead.
This series does that without needing a cache flush.

Patch 1 fixes the CMT test failing when all cache bits are tested.

Patch 2 measures a second time with all CBM bits set while the same
benchmark keeps running, and checks that LLC occupancy increased by
more than 15%.

Tested on one MPAM system (16 bit CBM, 172 MB L3).
- Default (5 bits) and -n 2, 4, 8: occupancy increases by 75% to 130%
  with the wider CBM, test passes.
- -n 9 and -n 16: second measurement is skipped, test passes. -n 16
  fails without patch 1 (write of "L3:1=0" fails).
- With the second schemata write changed to not widen the CBM the new
  check fails as it should. Widening 8 bits to 9 (+11%) fails, to 10
  (+23%) passes.
- -n 1 fails the existing check with and without this series,
  occupancy is 35% below the expected value on this system.
- The CMT test takes about 5 seconds longer.

Changes since v5:
- Drop "Implement cl_flus() and sb() for aarch64", replaced by
  patch 2.
- Add patch 1.
- "Recognise aarch64 as a vendor for L3_NONCONT_CAT" is sent
  separately, it does not depend on this series.

[1] https://lore.kernel.org/r/20261012074729.40042-1-icheng@nvidia.com


Richard Cheng (2):
  selftests/resctrl: Fix CMT test failure when all cache bits are tested
  selftests/resctrl: Check that CBM limits LLC occupancy in CMT test

 tools/testing/selftests/resctrl/cmt_test.c | 85 +++++++++++++++++++---
 1 file changed, 73 insertions(+), 12 deletions(-)


base-commit: 30af56a227e27b892d34bc44c23298b5274913e3
-- 
2.43.0


             reply	other threads:[~2026-11-14 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 14:01 Richard Cheng [this message]
2026-11-14 14:01 ` [PATCH v6 1/2] selftests/resctrl: Fix CMT test failure when all cache bits are tested Richard Cheng
2026-11-14 14:01 ` [PATCH v6 2/2] selftests/resctrl: Check that CBM limits LLC occupancy in CMT test Richard Cheng

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=20261114140108.36954-1-icheng@nvidia.com \
    --to=icheng@nvidia.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=fenghuay@nvidia.com \
    --cc=james.morse@arm.com \
    --cc=kaihengf@nvidia.com \
    --cc=kobak@nvidia.com \
    --cc=kristinc@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=newtonl@nvidia.com \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.