mbox series

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

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

Message

Vincent Donnefort Sept. 28, 2023, 5:32 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.

v1 -> v2:
  * Add git reference to [1] in the commit message
  * GUP always acted on the Head page under the hood. Update the commit
    message.

[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

Marc Zyngier Sept. 29, 2023, 9:12 a.m. UTC | #1
On Thu, 28 Sep 2023 18:32:02 +0100,
Vincent Donnefort <vdonnefort@google.com> 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.
> 
> v1 -> v2:
>   * Add git reference to [1] in the commit message
>   * GUP always acted on the Head page under the hood. Update the commit
>     message.
> 
> [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(-)

Reviewed-by: Marc Zyngier <maz@kernel.org>

	M.
Oliver Upton Sept. 30, 2023, 5:57 p.m. UTC | #2
On Thu, 28 Sep 2023 18:32:02 +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.
> 
> v1 -> v2:
>   * Add git reference to [1] in the commit message
>   * GUP always acted on the Head page under the hood. Update the commit
>     message.
> 
> [...]

Applied to kvmarm/next, thanks!

[1/2] KVM: arm64: Do not transfer page refcount for THP adjustment
      https://git.kernel.org/kvmarm/kvmarm/c/c04bf723ccd6
[2/2] KVM: arm64: Use folio for THP adjustment
      https://git.kernel.org/kvmarm/kvmarm/c/bf92834e6f6e

--
Best,
Oliver
Oliver Upton Oct. 30, 2023, 8:16 p.m. UTC | #3
On Sat, Sep 30, 2023 at 05:57:31PM +0000, Oliver Upton wrote:
> On Thu, 28 Sep 2023 18:32:02 +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.
> > 
> > v1 -> v2:
> >   * Add git reference to [1] in the commit message
> >   * GUP always acted on the Head page under the hood. Update the commit
> >     message.
> > 
> > [...]
> 
> Applied to kvmarm/next, thanks!
> 
> [1/2] KVM: arm64: Do not transfer page refcount for THP adjustment
>       https://git.kernel.org/kvmarm/kvmarm/c/c04bf723ccd6
> [2/2] KVM: arm64: Use folio for THP adjustment
>       https://git.kernel.org/kvmarm/kvmarm/c/bf92834e6f6e

Based on the discussion I've gone ahead and dropped the second patch.
I'm keeping the first since it is a nice cleanup.

Thanks Ryan for catching what would've otherwise been a rather nasty
bug.