[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12ec535821111d503773d6f623047d27@kernel.org>
Date: Thu, 11 Jun 2020 16:51:39 +0100
From: Marc Zyngier <maz@...nel.org>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: Paul Mackerras <paulus@...abs.org>,
Christian Borntraeger <borntraeger@...ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Paolo Bonzini <pbonzini@...hat.com>,
James Morse <james.morse@....com>,
Julien Thierry <julien.thierry.kdev@...il.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
David Hildenbrand <david@...hat.com>,
Cornelia Huck <cohuck@...hat.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-mips@...r.kernel.org, kvm@...r.kernel.org,
kvm-ppc@...r.kernel.org, linux-kernel@...r.kernel.org,
Peter Feiner <pfeiner@...gle.com>,
Peter Shier <pshier@...gle.com>,
Junaid Shahid <junaids@...gle.com>,
Ben Gardon <bgardon@...gle.com>,
Christoffer Dall <christoffer.dall@....com>
Subject: Re: [PATCH 17/21] KVM: arm64: Use common code's approach for
__GFP_ZERO with memory caches
On 2020-06-11 16:43, Sean Christopherson wrote:
> On Thu, Jun 11, 2020 at 08:59:05AM +0100, Marc Zyngier wrote:
>> >diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
>> >index 9398b66f8a87..688213ef34f0 100644
>> >--- a/arch/arm64/kvm/mmu.c
>> >+++ b/arch/arm64/kvm/mmu.c
>> >@@ -131,7 +131,8 @@ static int mmu_topup_memory_cache(struct
>> >kvm_mmu_memory_cache *cache, int min)
>> > if (cache->nobjs >= min)
>> > return 0;
>> > while (cache->nobjs < ARRAY_SIZE(cache->objects)) {
>> >- page = (void *)__get_free_page(GFP_PGTABLE_USER);
>> >+ page = (void *)__get_free_page(GFP_KERNEL_ACCOUNT |
>>
>> This is definitely a change in the way we account for guest
>> page tables allocation, although I find it bizarre that not
>> all architectures account for it the same way.
>
> It's not intended to be a functional change, i.e. the allocations
> should
> still be accounted:
>
> #define GFP_PGTABLE_USER (GFP_PGTABLE_KERNEL | __GFP_ACCOUNT)
> |
> -> #define GFP_PGTABLE_KERNEL (GFP_KERNEL | __GFP_ZERO)
>
> == GFP_KERNEL | __GFP_ACCOUNT | __GFP_ZERO
>
> versus
>
> #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT)
>
> with __GFP_ZERO explicitly OR'd in
>
> == GFP_KERNEL | __GFP_ACCOUNT | __GFP_ZERO
>
> I can put the above in the changelog, unless of course it's wrong and
> I've
> missed something.
Ah, good point. Serves me right for judging the symbol at face value!
;-)
I guess a quick mention in the changelog wouldn't hurt.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists