]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/filemap: Extend __filemap_get_folio() to support NUMA memory policies
authorMatthew Wilcox <willy@infradead.org>
Wed, 27 Aug 2025 17:52:44 +0000 (17:52 +0000)
committerSean Christopherson <seanjc@google.com>
Mon, 20 Oct 2025 13:30:25 +0000 (06:30 -0700)
commit16a542e22339cd5e73e56a956bbd335c7bd7c08c
treeeee18861f047a3e69ac4f2ca0db4c1ff82e7bb05
parent7f3779a3ac3e474d043f0a2b77dd6e6bb020c577
mm/filemap: Extend __filemap_get_folio() to support NUMA memory policies

Extend __filemap_get_folio() to support NUMA memory policies by
renaming the implementation to __filemap_get_folio_mpol() and adding
a mempolicy parameter. The original function becomes a static inline
wrapper that passes NULL for the mempolicy.

This infrastructure will enable future support for NUMA-aware page cache
allocations in guest_memfd memory backend KVM guests.

Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Shivank Garg <shivankg@amd.com>
Tested-by: Ashish Kalra <ashish.kalra@amd.com>
Link: https://lore.kernel.org/r/20250827175247.83322-5-shivankg@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
include/linux/pagemap.h
mm/filemap.c