]> www.infradead.org Git - users/willy/pagecache.git/commit
mm: Delay the check for a NULL anon_vma
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 12 Apr 2024 14:41:02 +0000 (10:41 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 12 Apr 2024 16:01:58 +0000 (12:01 -0400)
commit06d7da17eb40ba4d1b68f894ee16a8df78a4442f
tree9e8d43ce6a1a019f3664c7202be32e93c532c3a8
parentb6adf494d78314b61381c7093d713eee50dd2694
mm: Delay the check for a NULL anon_vma

Instead of checking the anon_vma early in the fault path where all page
faults pay the cost, delay it until we know we're going to need the
anon_vma to be filled in.  This will have a slight negative effect on the
first fault in an anonymous VMA, but it shortens every other page fault.
It also makes the code slightly cleaner as the anon and file backed
fault handling look more similar.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/huge_memory.c
mm/memory.c