From: Qinxin Xia <xiaqinxin@huawei.com>
To: <ben.horgan@arm.com>, <zhangzhanpeng.jasper@bytedance.com>,
<joro@8bytes.org>, <palmer@dabbelt.com>, <tony.luck@intel.com>,
<reinette.chatre@intel.com>, <tomasz.jeznach@linux.dev>,
<zengheng4@huawei.com>, <fustini@kernel.org>,
<cuiyunhui@bytedance.com>, <wangzhou1@hisilicon.com>,
<xiaqinxin@huawei.com>
Cc: <will@kernel.org>, <robin.murphy@arm.com>, <pjw@kernel.org>,
<aou@eecs.berkeley.edu>, <alex@ghiti.fr>, <Dave.Martin@arm.com>,
<james.morse@arm.com>, <babu.moger@amd.com>, <corbet@lwn.net>,
<shuah@kernel.org>, <jgg@ziepe.ca>, <kevin.tian@intel.com>,
<yuanzhu@bytedance.com>, <iommu@lists.linux.dev>,
<linuxarm@huawei.com>, <baolin.wang@linux.alibaba.com>
Subject: [RFC PATCH 0/5] resctrl: Assign devices to resource groups via IOMMU DMA QoS tagging
Date: Tue, 1 Sep 2026 22:07:57 +0800 [thread overview]
Message-ID: <20260901140802.1215508-1-xiaqinxin@huawei.com> (raw)
Hi all,
This RFC series lets resctrl assign a device to a resource group so that the
device's DMA traffic is subject to the same QoS controls (e.g. cache and
memory-bandwidth allocation) as the tasks and CPUs in that group. Until now
resctrl could only control CPU-originated traffic; DMA from devices behind an
IOMMU was unmanaged.
The mechanism is to tag a device's DMA with a QoS requestor ID at the IOMMU.
On Arm this maps to an MPAM PARTID/PMG programmed into the SMMUv3 stream table;
the interface is kept generic so other IOMMUs can plug in. resctrl exposes the
assignment through a new per-group "devices" file: writing a device name moves
it into the group and stamps its DMA with the group's QoS IDs. The file is only
shown on platforms where an IOMMU can actually tag device DMA.
Sending as an RFC to get feedback on the overall approach and on the generic
IOMMU interface in particular.
Previously we had some discussions with Ben and Zeng Heng about this[1], and we all
agreed that some refactoring would be desirable later. Later, Zhanpeng posted
his RFC series[2]. Like his patch, this series also introduces a new devices ABI
under resctrl. The difference is that in this series, the devices file accepts
device names directly, rather than iommu_group identifiers (we consider supporting
fuzzy matching in the future to allow batch addition of devices).
Welcome any discussions based on this :-)
[1] https://lore.kernel.org/lkml/d13fdc75-b647-44f3-9657-d592353e8a1a@huawei.com/
[2] https://lore.kernel.org/all/20260714130657.46963-1-zhangzhanpeng.jasper@bytedance.com/
Qinxin Xia (5):
iommu: Add per-device requestor QoS tagging and lookup helpers
arm_mpam: resctrl: Add arch query for device DMA QoS support
iommu/arm-smmu-v3: Support MPAM device DMA QoS tagging
fs/resctrl: Add device-to-group QoS tracking infrastructure
fs/resctrl: Add a "devices" file to assign devices to groups
Documentation/filesystems/resctrl.rst | 18 +-
arch/x86/include/asm/resctrl.h | 5 +
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 96 ++++++++
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 13 +
drivers/iommu/iommu.c | 113 +++++++++
drivers/resctrl/mpam_devices.c | 20 ++
drivers/resctrl/mpam_resctrl.c | 5 +
fs/resctrl/internal.h | 9 +
fs/resctrl/pseudo_lock.c | 5 +
fs/resctrl/rdtgroup.c | 249 ++++++++++++++++++++
include/linux/arm_mpam.h | 5 +
include/linux/iommu.h | 29 +++
12 files changed, 565 insertions(+), 2 deletions(-)
--
2.33.0
next reply other threads:[~2026-09-01 14:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 14:07 Qinxin Xia [this message]
2026-09-01 14:07 ` [RFC PATCH 1/5] iommu: Add per-device requestor QoS tagging and lookup helpers Qinxin Xia
2026-09-01 14:07 ` [RFC PATCH 2/5] arm_mpam: resctrl: Add arch query for device DMA QoS support Qinxin Xia
2026-09-01 14:08 ` [RFC PATCH 3/5] iommu/arm-smmu-v3: Support MPAM device DMA QoS tagging Qinxin Xia
2026-09-01 14:08 ` [RFC PATCH 4/5] fs/resctrl: Add device-to-group QoS tracking infrastructure Qinxin Xia
2026-09-01 14:08 ` [RFC PATCH 5/5] fs/resctrl: Add a "devices" file to assign devices to groups Qinxin Xia
2026-09-10 10:24 ` 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=20260901140802.1215508-1-xiaqinxin@huawei.com \
--to=xiaqinxin@huawei.com \
--cc=Dave.Martin@arm.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=babu.moger@amd.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=ben.horgan@arm.com \
--cc=corbet@lwn.net \
--cc=cuiyunhui@bytedance.com \
--cc=fustini@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=james.morse@arm.com \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linuxarm@huawei.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=reinette.chatre@intel.com \
--cc=robin.murphy@arm.com \
--cc=shuah@kernel.org \
--cc=tomasz.jeznach@linux.dev \
--cc=tony.luck@intel.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=yuanzhu@bytedance.com \
--cc=zengheng4@huawei.com \
--cc=zhangzhanpeng.jasper@bytedance.com \
/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.