Re: [PATCH v3 3/4] mm/gup: add a range variant of unpin_user_pages_dirty_lock()

2021-02-11 Thread Joao Martins
On 2/10/21 11:19 PM, John Hubbard wrote: > On 2/5/21 12:41 PM, Joao Martins wrote: >> Add a unpin_user_page_range_dirty_lock() API which takes a starting page >> and how many consecutive pages we want to unpin and optionally dirty. >> >> To that end, define another iterator for_each_compound_ran

Re: [PATCH v3 3/4] mm/gup: add a range variant of unpin_user_pages_dirty_lock()

2021-02-11 Thread Joao Martins
On 2/10/21 11:15 PM, Jason Gunthorpe wrote: > On Fri, Feb 05, 2021 at 08:41:26PM +, Joao Martins wrote: >> Add a unpin_user_page_range_dirty_lock() API which takes a starting page >> and how many consecutive pages we want to unpin and optionally dirty. >> >> To that end, define another itera

Re: [PATCH v3 3/4] mm/gup: add a range variant of unpin_user_pages_dirty_lock()

2021-02-10 Thread John Hubbard
On 2/5/21 12:41 PM, Joao Martins wrote: Add a unpin_user_page_range_dirty_lock() API which takes a starting page and how many consecutive pages we want to unpin and optionally dirty. To that end, define another iterator for_each_compound_range() that operates in page ranges as opposed to page ar

Re: [PATCH v3 3/4] mm/gup: add a range variant of unpin_user_pages_dirty_lock()

2021-02-10 Thread Jason Gunthorpe
On Fri, Feb 05, 2021 at 08:41:26PM +, Joao Martins wrote: > Add a unpin_user_page_range_dirty_lock() API which takes a starting page > and how many consecutive pages we want to unpin and optionally dirty. > > To that end, define another iterator for_each_compound_range() > that operates in pag

[PATCH v3 3/4] mm/gup: add a range variant of unpin_user_pages_dirty_lock()

2021-02-05 Thread Joao Martins
Add a unpin_user_page_range_dirty_lock() API which takes a starting page and how many consecutive pages we want to unpin and optionally dirty. To that end, define another iterator for_each_compound_range() that operates in page ranges as opposed to page array. For users (like RDMA mr_dereg) where