Re: [PATCH v3 00/10] Let iommufd charge IOPTE allocations to the memory cgroup

2023-01-25 Thread Joerg Roedel
On Mon, Jan 23, 2023 at 04:35:53PM -0400, Jason Gunthorpe wrote: > Jason Gunthorpe (10): > iommu: Add a gfp parameter to iommu_map() > iommu: Remove iommu_map_atomic() > iommu: Add a gfp parameter to iommu_map_sg() > iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous() >

[PATCH v3 00/10] Let iommufd charge IOPTE allocations to the memory cgroup

2023-01-23 Thread Jason Gunthorpe
iommufd follows the same design as KVM and uses memory cgroups to limit the amount of kernel memory a iommufd file descriptor can pin down. The various internal data structures already use GFP_KERNEL_ACCOUNT to charge its own memory. However, one of the biggest consumers of kernel memory is the