Re: [PATCH] mm/gup: restore the ability to pin more than 2GB at a time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/24 5:04 AM, Jason Gunthorpe wrote:
On Wed, Oct 30, 2024 at 09:34:51AM +0100, David Hildenbrand wrote:

The unusual thing is not the amount of system memory we are pinning but *how
many* pages we try pinning in the single call.

If you stare at vfio_pin_pages_remote, we seem to be batching it.

long req_pages = min_t(long, npage, batch->capacity);

Which is

#define VFIO_BATCH_MAX_CAPACITY (PAGE_SIZE / sizeof(struct page *))

So you can fix this in your driver ;)

Yeah, everything batches that I'm aware of. RDMA also uses a 4k batch
size, and iommufd uses 64k.

Jason

Yes. It's a surprise, but the driver can do that.


thanks,
--
John Hubbard





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux