The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Richard Cheng <icheng@nvidia.com>
To: tony.luck@intel.co, shuah@kernel.org, reinette.chatre@intel.com
Cc: Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	fenghuay@nvidia.com, newtonl@nvidia.com, kristinc@nvidia.com,
	kaihengf@nvidia.com, kobak@nvidia.com, sdonthineni@nvidia.com,
	Richard Cheng <icheng@nvidia.com>
Subject: [PATCH v2 0/2] selftests/resctrl: Increase L3 cache test coverage
Date: Mon, 10 Aug 2026 17:51:21 +0800	[thread overview]
Message-ID: <20260810095124.32244-1-icheng@nvidia.com> (raw)

The resctrl selftests check L3 cache isolation L3_CAT and occupancy
accuracy CMT, but some basic L3 behavior is untested. That CBM writes
are handle correctly and that info/L3/bit_usage reports allocations
correctly.

Add two self-contained tests for these. Each gates on the feature it
needs, so it runs wherever that feature exists and skips otherwise.
They were exercised on an arm64 MPAM platform.

Changes since v1:
- Drop L3_CAT_OCCUP because CMT already tests cache occupancy bounds.
- Rework L3_CAT_VALIDATE as L3_CBM_VALIDATE to check valid and invalid
  CBMs using cbm_mask and min_cbm_bits.
- Rework L3_BIT_USAGE to use valid partial allocations and simplify
  domain bit_usage parsing.


Running checkpatch.pl will have warning on patch 1 about string issue,
I've tweaked it for several times so I'll let you decide whether we
should decrease the message or leave it as is.


Richard Cheng (2):
  selftests/resctrl: Add L3_CBM_VALIDATE to check CBM writes
  selftests/resctrl: Add L3_BIT_USAGE to check allocation reporting

 tools/testing/selftests/resctrl/cat_test.c    | 285 ++++++++++++++++++
 tools/testing/selftests/resctrl/resctrl.h     |   2 +
 .../testing/selftests/resctrl/resctrl_tests.c |   2 +
 3 files changed, 289 insertions(+)


base-commit: 840ef6c78e6a2f694b578ecb9063241c992aaa9e
-- 
2.53.0


             reply	other threads:[~2026-08-10  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  9:51 Richard Cheng [this message]
2026-08-10  9:51 ` [PATCH v2 1/2] selftests/resctrl: Add L3_CBM_VALIDATE to check CBM writes Richard Cheng
2026-08-10  9:51 ` [PATCH v2 2/2] selftests/resctrl: Add L3_BIT_USAGE to check allocation reporting 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=20260810095124.32244-1-icheng@nvidia.com \
    --to=icheng@nvidia.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.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=sdonthineni@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=tony.luck@intel.co \
    /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