From: Jinjie Ruan <ruanjinjie@huawei.com>
To: yunhui cui <cuiyunhui@bytedance.com>
Cc: <tony.luck@intel.com>, <reinette.chatre@intel.com>,
<ben.horgan@arm.com>, <Dave.Martin@arm.com>,
<james.morse@arm.com>, <babu.moger@amd.com>, <fustini@kernel.org>,
<tglx@kernel.org>, <mingo@redhat.com>, <bp@alien8.de>,
<dave.hansen@linux.intel.com>, <hpa@zytor.com>,
<fenghuay@nvidia.com>, <shuah@kernel.org>, <corbet@lwn.net>,
<skhan@linuxfoundation.org>, <rdunlap@infradead.org>,
<x86@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-riscv@lists.infradead.org>,
<linux-kselftest@vger.kernel.org>, <kunit-dev@googlegroups.com>,
<linux-doc@vger.kernel.org>
Subject: Re: [External] Re: [RFC PATCH 00/13] resctrl: Introduce a framework for logical control IDs
Date: Mon, 30 Nov 2026 15:29:11 +0800 [thread overview]
Message-ID: <228f8604-b48c-47dc-84f2-6056b19a2695@huawei.com> (raw)
In-Reply-To: <CAEEQ3wkhVy1Zo5pW_JMi7tC+CJ0dzwe+v_DscZNVToyybE+rRA@mail.gmail.com>
在 2026/11/30 14:56, yunhui cui 写道:
> Hi Jinjie,
>
> On Mon, Nov 30, 2026 at 2:15 PM Jinjie Ruan <ruanjinjie@huawei.com> wrote:
>>
>>
>>
>> 在 2026/11/30 10:29, Yunhui Cui 写道:
>>> Some resource controllers can accept a wider request-ID namespace than
>>> the number of configuration entries they provide. Arm MPAM PARTID
>>> narrowing is one example: requests carry a PARTID, while an MSC maps it
>>> to a smaller internal PARTID table. A future RISC-V CBQRI backend is
>>
>> We have been working on narrow partid for a long time. Could you please
>> drop the patches related to MPAM narrow partid?
>>
>> Link:
>> https://lore.kernel.org/all/20261020134239.3921377-1-ruanjinjie@huawei.com/
>
> Thanks for pointing me to the v10 series.
>
> This RFC focuses on the generic resctrl logical-control-ID framework.
> It is not intended to modify or extend MPAM's Narrow-PARTID
> functionality itself.
>
> The idea is for generic resctrl to provide a common lifecycle, with
> each architecture backend integrating according to its hardware model:
> x86 retains its direct-index behavior, MPAM implements the
> mapped-controller interfaces, and a future RISC-V CBQRI backend can
> use the same framework.
Hi Yunhui,
Don't you think it is too early to provide a framework now?
Currently, the narrow partid on the mpam side cannot work properly on
the mainline, and RISC-V seems to have only just started providing
support. There are some suggestions from James on v8, where he
recommends implementing the simplest static narrow partid first.
Should we follow James's suggestion in v8 and ensure that these features
work properly across different architectures before considering the
framework?
v8:
https://lore.kernel.org/all/20260413085405.1166412-1-zengheng4@huawei.com/
https://lore.kernel.org/all/88c6c8cd-5da7-4c28-8d5c-7d6489e5913f@picoheart.com/
>
> The current series is based on next-20261127, which does not include
> the v10 patches, so the MPAM backend changes are implemented against
> the current code. In a subsequent revision, even if v10 has not been
> merged, I can use it as the base for the MPAM part and rebase this
> series on top of it.
>
> Thanks,
> Yunhui
>
>>
>>
>>> expected to need a similar mapping from request RCIDs to controller-local
>>> entries. Resctrl currently uses one ID both to identify a control group
>>> and to select its hardware entry, so the smallest table limits the number
>>> of groups exposed to user space.
>>>
>>> The framework uses a logical control ID in generic resctrl while each
>>> architecture selects a hardware entry according to its own model:
>>>
>>> generic resctrl
>>> logical control ID
>>> |
>>> +------------------+------------------+
>>> | | |
>>> x86 arm64 MPAM RISC-V CBQRI
>>> direct index MSC mapping mapping (proposed)
>>> | | |
>>> hardware entry internal PARTID controller entry
>>>
>>> Without controller-local request-ID mapping, the same request ID directly
>>> indexes every controller. If g1 configures only A and g2 only B, g1
>>> cannot select its private entry in A and B's root entry while g2 makes
>>> the opposite selection. Each group therefore consumes an entry in both
>>> controllers. Controller-local mapping makes these selections independent,
>>> so A needs entries only for the root group and g1 while B needs only the
>>> root group and g2.
>>>
>>> This series gives control groups logical IDs. A new group initially
>>> selects the root policy and consumes no private entry on a narrowing
>>> controller. Its first explicit policy write allocates and programs an
>>> entry only on the affected controllers, then publishes the
>>> request-to-internal ID mapping. Controllers that have not been configured
>>> continue to follow the root policy. A same-value write still creates a
>>> private policy, so a later root update does not change it.
>>>
>>> Entry reservation is completed before a multi-controller policy update
>>> and mapping changes are published only after the entries are programmed.
>>> Group removal maps requests back to the root entry before an internal
>>> entry or logical ID can be reused. CDP keeps separate data and code root
>>> entries so the default policies remain distinct.
>>>
>>> Identity-mapped architectures retain their current behavior, and I/O
>>> allocation continues to address a hardware entry directly. The generic
>>> framework supports both direct-index and mapped controllers. The RISC-V
>>> backend itself is outside this series.
>>>
>>> Base: next-20261127
>>>
>>> Yunhui Cui (13):
>>> resctrl: Introduce interfaces for logical control IDs
>>> resctrl: Add prepare, commit and abort hooks for control updates
>>> resctrl: Add a release hook before logical control ID reuse
>>> arm_mpam: Record PARTID narrowing capacity per MSC
>>> arm_mpam: Select PARTID narrowing per component
>>> arm_mpam: Add an internal PARTID allocator
>>> arm_mpam: Add request-to-internal PARTID mapping
>>> arm_mpam: Apply PARTID narrowing to resctrl control groups
>>> arm_mpam: Separate request and internal PARTID limits
>>> arm_mpam: Map CDP data and code defaults separately
>>> arm_mpam: Add kunit tests for PARTID narrowing
>>> selftests/resctrl: Add a test for control ID allocation and reuse
>>> docs/resctrl: Document logical control IDs and hardware entries
>>>
>>> Documentation/filesystems/resctrl.rst | 88 ++
>>> arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 38 +-
>>> drivers/resctrl/mpam_devices.c | 857 +++++++++++++++++-
>>> drivers/resctrl/mpam_internal.h | 25 +-
>>> drivers/resctrl/mpam_resctrl.c | 288 +++++-
>>> drivers/resctrl/test_mpam_devices.c | 619 ++++++++++++-
>>> drivers/resctrl/test_mpam_resctrl.c | 172 ++++
>>> fs/resctrl/ctrlmondata.c | 28 +-
>>> fs/resctrl/rdtgroup.c | 18 +-
>>> include/linux/resctrl.h | 17 +-
>>> .../testing/selftests/resctrl/ctrl_id_test.c | 380 ++++++++
>>> tools/testing/selftests/resctrl/resctrl.h | 1 +
>>> .../testing/selftests/resctrl/resctrl_tests.c | 1 +
>>> 13 files changed, 2470 insertions(+), 62 deletions(-)
>>> create mode 100644 tools/testing/selftests/resctrl/ctrl_id_test.c
>>>
>>
>
next prev parent reply other threads:[~2026-11-30 7:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 2:29 Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 01/13] resctrl: Introduce interfaces " Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 02/13] resctrl: Add prepare, commit and abort hooks for control updates Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 03/13] resctrl: Add a release hook before logical control ID reuse Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 04/13] arm_mpam: Record PARTID narrowing capacity per MSC Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 05/13] arm_mpam: Select PARTID narrowing per component Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 06/13] arm_mpam: Add an internal PARTID allocator Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 07/13] arm_mpam: Add request-to-internal PARTID mapping Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 08/13] arm_mpam: Apply PARTID narrowing to resctrl control groups Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 09/13] arm_mpam: Separate request and internal PARTID limits Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 10/13] arm_mpam: Map CDP data and code defaults separately Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 11/13] arm_mpam: Add kunit tests for PARTID narrowing Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 12/13] selftests/resctrl: Add a test for control ID allocation and reuse Yunhui Cui
2026-11-30 2:29 ` [RFC PATCH 13/13] docs/resctrl: Document logical control IDs and hardware entries Yunhui Cui
2026-11-30 6:15 ` [RFC PATCH 00/13] resctrl: Introduce a framework for logical control IDs Jinjie Ruan
2026-11-30 6:56 ` [External] " yunhui cui
2026-11-30 7:29 ` Jinjie Ruan [this message]
2026-11-30 11:22 ` Ben Horgan
2026-11-30 12:09 ` Jinjie Ruan
2026-11-30 14:09 ` [External] " yunhui cui
2026-11-30 15:22 ` Ben Horgan
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=228f8604-b48c-47dc-84f2-6056b19a2695@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=cuiyunhui@bytedance.com \
--cc=dave.hansen@linux.intel.com \
--cc=fenghuay@nvidia.com \
--cc=fustini@kernel.org \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=shuah@kernel.org \
--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®