All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] resctrl: Assign devices to resource groups via IOMMU DMA QoS tagging
@ 2026-09-01 14:07 Qinxin Xia
  2026-09-01 14:07 ` [RFC PATCH 1/5] iommu: Add per-device requestor QoS tagging and lookup helpers Qinxin Xia
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Qinxin Xia @ 2026-09-01 14:07 UTC (permalink / raw)
  To: ben.horgan, zhangzhanpeng.jasper, joro, palmer, tony.luck,
	reinette.chatre, tomasz.jeznach, zengheng4, fustini, cuiyunhui,
	wangzhou1, xiaqinxin
  Cc: will, robin.murphy, pjw, aou, alex, Dave.Martin, james.morse,
	babu.moger, corbet, shuah, jgg, kevin.tian, yuanzhu, iommu,
	linuxarm, baolin.wang

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-10 10:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 14:07 [RFC PATCH 0/5] resctrl: Assign devices to resource groups via IOMMU DMA QoS tagging Qinxin Xia
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

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.