[PATCH v13 1/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

David Hildenbrand david at redhat.com
Fri Apr 5 09:15:00 UTC 2024


On 04.04.24 09:26, Vivek Kasireddy wrote:
> These helpers are the folio versions of unpin_user_page/unpin_user_pages.
> They are currently only useful for unpinning folios pinned by
> memfd_pin_folios() or other associated routines. However, they could
> find new uses in the future, when more and more folio-only helpers
> are added to GUP.
> 
> We should probably sanity check the folio as part of unpin similar
> to how it is done in unpin_user_page/unpin_user_pages but we cannot
> cleanly do that at the moment without also checking the subpage.
> Therefore, sanity checking needs to be added to these routines once
> we have a way to determine if any given folio is anon-exclusive (via
> a per folio AnonExclusive flag).
> 
> Cc: David Hildenbrand <david at redhat.com>
> Cc: Matthew Wilcox <willy at infradead.org>
> Cc: Christoph Hellwig <hch at infradead.org>
> Cc: Jason Gunthorpe <jgg at nvidia.com>
> Cc: Peter Xu <peterx at redhat.com>
> Suggested-by: David Hildenbrand <david at redhat.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy at intel.com>
> ---

Reviewed-by: David Hildenbrand <david at redhat.com>

-- 
Cheers,

David / dhildenb



More information about the dri-devel mailing list