lkml.org 
[lkml]   [2023]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 00/19] mm: Introduce a cgroup to limit the amount of locked and pinned memory
From
On 31.01.23 15:03, Jason Gunthorpe wrote:
> On Tue, Jan 31, 2023 at 02:57:20PM +0100, David Hildenbrand wrote:
>
>>> I'm excited by this series, thanks for making it.
>>>
>>> The pin accounting has been a long standing problem and cgroups will
>>> really help!
>>
>> Indeed. I'm curious how GUP-fast, pinning the same page multiple times, and
>> pinning subpages of larger folios are handled :)
>
> The same as today. The pinning is done based on the result from GUP,
> and we charge every returned struct page.
>
> So duplicates are counted multiple times, folios are ignored.
>
> Removing duplicate charges would be costly, it would require storage
> to keep track of how many times individual pages have been charged to
> each cgroup (eg an xarray indexed by PFN of integers in each cgroup).
>
> It doesn't seem worth the cost, IMHO.
>
> We've made alot of investment now with iommufd to remove the most
> annoying sources of duplicated pins so it is much less of a problem in
> the qemu context at least.

Wasn't there the discussion regarding using vfio+io_uring+rdma+$whatever
on a VM and requiring multiple times the VM size as memlock limit? Would
it be the same now, just that we need multiple times the pin limit?

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2023-03-27 00:03    [W:0.094 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site