Re: Resctrl and I/O
From: Drew Fustini
Date: Tue Sep 22 2026 - 21:28:47 EST
On Tue, Sep 22, 2026 at 09:51:11AM -0700, Luck, Tony wrote:
> Patches for ARM[1] and RISC-V[2] are both at RFC status.
>
> They appear to be based on similar h/w capabilities where architecture
> specific tags can be added to transactions from I/O devices by the IOMMU
> servicing the device. Device enumeration is handled outside of the resctrl
> file system.
Thanks for starting a discussion on this topic.
> RISC-V description of "architecture specific device tokens" sounds great.
> I'll have to find some ares of /sys to provide the mapping of tokens to
> "device groups". There's no association with IOMMUs, so this will be some
> other path in /sys. Perhaps under /sys/firmware/acpi since the data comes
> from ACPI IRDT table.
resctrl could parse iommu_group:<id> itself which should cover the IOMMU
case on ARM and RISC-V. Maybe other prefixes could be passed on to arch
code?
> Need an info file to tell users the format and source for device tokens.
I agree and it could list which token namespaces the platform uses.
> I'd like to avoid limiting resctrl monitoring of CPU activity due to the small
> number of I/O RMIDs. Perhaps don't include a "devices" file or mon_data/{i/o
> events} files in resctrl group directories when rdtgroup::mon::rmid >=
> num_io_rmids? But that feels clumsy.
There's no separate I/O ID space on RISC-V that could be smaller. The
IDs a device carries are the same IDs the hart (e.g. cpu) carries. The
number of RCIDs (e.g. CLOSID) and MCIDs (e.g. RMID) is a property of
each capacity or bandwidth (CBQRI) controller. The RISC-V IOMMU spec
also requires the IOMMU to support RCID and MCID at least as wide as any
hart.
Thanks,
Drew