Re: [PATCH v3 4/4] RDMA/umem: batch page unpin in __ib_umem_release()
From: Joao Martins <hidden>
Date: 2021-02-11 10:40:37
Also in:
linux-mm, lkml
From: Joao Martins <hidden>
Date: 2021-02-11 10:40:37
Also in:
linux-mm, lkml
On 2/10/21 11:17 PM, Jason Gunthorpe wrote:
On Fri, Feb 05, 2021 at 08:41:27PM +0000, Joao Martins wrote:quoted
Use the newly added unpin_user_page_range_dirty_lock() for more quickly unpinning a consecutive range of pages represented as compound pages. This will also calculate number of pages to unpin (for the tail pages which matching head page) and thus batch the refcount update. Running a test program which calls mr reg/unreg on a 1G in size and measures cost of both operations together (in a guest using rxe) with THP and hugetlbfs: Before: 590 rounds in 5.003 sec: 8480.335 usec / round 6898 rounds in 60.001 sec: 8698.367 usec / round After: 2688 rounds in 5.002 sec: 1860.786 usec / round 32517 rounds in 60.001 sec: 1845.225 usec / round Signed-off-by: Joao Martins <redacted> --- drivers/infiniband/core/umem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Would best for this to go through Andrew's tree Acked-by: Jason Gunthorpe <jgg@nvidia.com> 4x improvement is pretty good!
It would only be half of that improvement if it wasn't for your unpin_user_page_range_dirty_lock() suggestion, so thanks for all the input :) Joao