]> www.infradead.org Git - users/willy/pagecache.git/commit
mm: Optimise vmf_anon_prepare() for VMAs without an anon_vma vma-lock
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 15 Apr 2024 15:13:41 +0000 (11:13 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 15 Apr 2024 18:15:52 +0000 (14:15 -0400)
commitdc1f4afb085cc04eea50b0294d58fe96446db57b
treeb5237e9f3c7f7494f3fa0dabe62f6d084c217384
parent6b9e6c6ae6815777306433872b73ada04dcea49d
mm: Optimise vmf_anon_prepare() for VMAs without an anon_vma

If the mmap_lock can be taken for read, we can call __anon_vma_prepare()
while holding it, saving ourselves a trip back through the fault handler.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Jann Horn <jannh@google.com>
mm/memory.c