OSDN Git Service

mm/memory.c: refactor insert_page to prepare for batched-lock insert
authorArjun Roy <arjunroy@google.com>
Fri, 10 Apr 2020 21:32:51 +0000 (14:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Apr 2020 22:36:21 +0000 (15:36 -0700)
commit8efd6f5b1732c4ac88b4bb6908d481d95804fa1c
treec5f087f6ee4a21684daae1ed568b0d6aed887b52
parent09ef5283fd96ac424ef0e569626f359bf9ab86c9
mm/memory.c: refactor insert_page to prepare for batched-lock insert

Add helper methods for vm_insert_page()/insert_page() to prepare for
vm_insert_pages(), which batch-inserts pages to reduce spinlock
operations when inserting multiple consecutive pages into the user page
table.

The intention of this patch-set is to reduce atomic ops for tcp zerocopy
receives, which normally hits the same spinlock multiple times
consecutively.

Signed-off-by: Arjun Roy <arjunroy@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://lkml.kernel.org/r/20200128025958.43490-1-arjunroy.kdev@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c