[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6004eaa4-934c-48f4-b502-cf7e436462fc@amd.com>
Date: Thu, 7 Nov 2024 14:24:20 +0530
From: Shivank Garg <shivankg@....com>
To: Matthew Wilcox <willy@...radead.org>
Cc: x86@...nel.org, viro@...iv.linux.org.uk, brauner@...nel.org,
jack@...e.cz, akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-api@...r.kernel.org, linux-arch@...r.kernel.org, kvm@...r.kernel.org,
chao.gao@...el.com, pgonda@...gle.com, thomas.lendacky@....com,
seanjc@...gle.com, luto@...nel.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, arnd@...db.de,
pbonzini@...hat.com, kees@...nel.org, bharata@....com, nikunj@....com,
michael.day@....com, Neeraj.Upadhyay@....com, linux-coco@...ts.linux.dev
Subject: Re: [RFC PATCH 0/4] Add fbind() and NUMA mempolicy support for KVM
guest_memfd
Hi Matthew,
On 11/6/2024 12:25 AM, Matthew Wilcox wrote:
> On Tue, Nov 05, 2024 at 04:45:45PM +0000, Shivank Garg wrote:
>> This patch series introduces fbind() syscall to support NUMA memory
>> policies for KVM guest_memfd, allowing VMMs to configure memory placement
>> for guest memory. This addresses the current limitation where guest_memfd
>> allocations ignore NUMA policies, potentially impacting performance of
>> memory-locality-sensitive workloads.
>
> Why does guest_memfd ignore numa policies? The pagecache doesn't,
> eg in vma_alloc_folio_noprof().
guest_memfd doesn't have VMAs and hence can't store policy information in
VMA and use vma_alloc_folio_noprof() that fetches mpol from VMA.
The folio allocation path from guest_memfd typically looks like this...
kvm_gmem_get_folio
filemap_grab_folio
__filemap_get_folio
filemap_alloc_folio
__folio_alloc_node_noprof
-> goes to the buddy allocator
Hence, I am trying to have a version of filemap_alloc_folio() that takes an mpol.
Thanks,
Shivank
Powered by blists - more mailing lists