RFC resctrl: Assign devices to resource groups via IOMMU DMA QoS tagging
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | iommu: Add per-device requestor QoS tagging and lookup helpersdrivers/ include/ | +142 | 0 replies | |
| 2/5 | arm_mpam: resctrl: Add arch query for device DMA QoS supportarch/ drivers/ drivers/ +1 more | +35 | 0 replies | |
| 3/5 | iommu/arm-smmu-v3: Support MPAM device DMA QoS taggingdrivers/ drivers/ | +109 | 0 replies | |
| 4/5 | fs/resctrl: Add device-to-group QoS tracking infrastructurefs/ fs/ fs/ | +162 | 0 replies | |
| 5/5 | fs/resctrl: Add a "devices" file to assign devices to groupsDocumentation/ fs/ | +117 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/5] resctrl: Assign devices to resource groups via IOMMU DMA QoS tagging
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/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
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(-)
Signature · 1 line
2.33.0