mbox series

[v1,0/2] KVM: arm64: Use folio for THP support

Message ID 20230926181932.1650692-1-vdonnefort@google.com (mailing list archive)
Headers show
Series KVM: arm64: Use folio for THP support | expand

Message

Vincent Donnefort Sept. 26, 2023, 6:19 p.m. UTC
With the introduction of folios for transparent huge pages [1], we
can rely on this support to identify if a page is backed by a huge one,
saving a page table walk.

[1] https://lkml.kernel.org/r/20220504182857.4013401-3-willy@infradead.org

Vincent Donnefort (2):
  KVM: arm64: Do not transfer page refcount for THP adjustment
  KVM: arm64: Use folio for THP adjustment

 arch/arm64/kvm/mmu.c | 79 ++------------------------------------------
 1 file changed, 3 insertions(+), 76 deletions(-)


base-commit: ce9ecca0238b140b88f43859b211c9fdfd8e5b70

Comments

Oliver Upton Sept. 27, 2023, 6:30 a.m. UTC | #1
Vincent,

On Tue, Sep 26, 2023 at 07:19:30PM +0100, Vincent Donnefort wrote:
> With the introduction of folios for transparent huge pages [1], we
> can rely on this support to identify if a page is backed by a huge one,
> saving a page table walk.

Better yet, this gets rid of a particular walk that has had some rather
hairy bugs in the past :)

> [1] https://lkml.kernel.org/r/20220504182857.4013401-3-willy@infradead.org

nit: for the sake of posterity, it might be good to stick a reference to
commit cb196ee1ef39 ("mm/huge_memory: convert do_huge_pmd_anonymous_page()
to use vma_alloc_folio()") in the changelogs.
Vincent Donnefort Sept. 27, 2023, 12:39 p.m. UTC | #2
On Wed, Sep 27, 2023 at 06:30:40AM +0000, Oliver Upton wrote:
> Vincent,
> 
> On Tue, Sep 26, 2023 at 07:19:30PM +0100, Vincent Donnefort wrote:
> > With the introduction of folios for transparent huge pages [1], we
> > can rely on this support to identify if a page is backed by a huge one,
> > saving a page table walk.
> 
> Better yet, this gets rid of a particular walk that has had some rather
> hairy bugs in the past :)
> 
> > [1] https://lkml.kernel.org/r/20220504182857.4013401-3-willy@infradead.org
> 
> nit: for the sake of posterity, it might be good to stick a reference to
> commit cb196ee1ef39 ("mm/huge_memory: convert do_huge_pmd_anonymous_page()
> to use vma_alloc_folio()") in the changelogs.

I'll add that reference in the following version.

> 
> -- 
> Thanks,
> Oliver