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@xxxxxxxxxx> > --- > 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@xxxxxxxxxx> 4x improvement is pretty good! Jason