Re: [RFC PATCH 01/19] mm: Introduce vm_account

2023-01-31 Thread David Hildenbrand
On 24.01.23 06:42, Alistair Popple wrote: Kernel drivers that pin pages should account these pages against either user->locked_vm or mm->pinned_vm and fail the pinning if RLIMIT_MEMLOCK is exceeded and CAP_IPC_LOCK isn't held. Currently drivers open-code this accounting and use various methods

Re: [RFC PATCH 01/19] mm: Introduce vm_account

2023-01-23 Thread Christoph Hellwig
> +/** > + * vm_account_init - Initialise a new struct vm_account. > + * @vm_account: pointer to uninitialised vm_account. > + * @task: task to charge against. > + * @user: user to charge against. Must be non-NULL for VM_ACCOUNT_USER. > + * @flags: flags to use when charging to vm_account. > + * >