[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5f5bd91-df18-1d53-28eb-286336b976dd@oracle.com>
Date: Thu, 11 Feb 2021 10:35:41 +0000
From: Joao Martins <joao.m.martins@...cle.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-rdma@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Doug Ledford <dledford@...hat.com>,
John Hubbard <jhubbard@...dia.com>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v3 4/4] RDMA/umem: batch page unpin in __ib_umem_release()
On 2/10/21 11:17 PM, Jason Gunthorpe wrote:
> On Fri, Feb 05, 2021 at 08:41:27PM +0000, Joao Martins wrote:
>> 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 <joao.m.martins@...cle.com>
>> ---
>> 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@...dia.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
Powered by blists - more mailing lists