vfio/hisi: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations
authorYishai Hadas <yishaih@nvidia.com>
Sun, 8 Jan 2023 15:44:25 +0000 (17:44 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 23 Jan 2023 18:26:30 +0000 (11:26 -0700)
commitcb8285b89f2cf1db866f5c5aae5ce8db7aef41dd
tree5ad7ff08c405dcb3c9e6ccb49a1762d297630099
parent0886196ca8810c5b1f5097b71c4bc0df40b10208
vfio/hisi: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations

Use GFP_KERNEL_ACCOUNT for userspace persistent allocations.

The GFP_KERNEL_ACCOUNT option lets the memory allocator know that this
is untrusted allocation triggered from userspace and should be a subject
of kmem accounting, and as such it is controlled by the cgroup
mechanism.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230108154427.32609-5-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c