[PATCH v2 05/10] iommufd: Use GFP_KERNEL_ACCOUNT for iommu_map()

Tian, Kevin kevin.tian at intel.com
Thu Jan 19 03:48:50 UTC 2023


> From: Jason Gunthorpe <jgg at nvidia.com>
> Sent: Thursday, January 19, 2023 2:01 AM
> 
> 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.
> 
> However, one of the biggest consumers of kernel memory is the IOPTEs
> stored under the iommu_domain. Many drivers will allocate these at
> iommu_map() time and will trivially do the right thing if we pass in
> GFP_KERNEL_ACCOUNT.
> 
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>

Reviewed-by: Kevin Tian <kevin.tian at intel.com>


More information about the dri-devel mailing list