From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Bibo Mao <maobibo@loongson.cn>
Subject: Re: [PATCH v3] KVM: x86/mmu: Always drop mmu_lock to allocate TDP MMU SPs for eager splitting
Date: Tue, 11 Jun 2024 09:35:32 -0700 [thread overview]
Message-ID: <Zmh81J7eflG-aj4X@google.com> (raw)
In-Reply-To: <ZmhtYqtAou031wjV@google.com>
On Tue, Jun 11, 2024, David Matlack wrote:
> On 2024-06-03 11:13 AM, Sean Christopherson wrote:
> > On Thu, May 09, 2024, David Matlack wrote:
> > > diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
> > > index aaa2369a9479..2089d696e3c6 100644
> > > --- a/arch/x86/kvm/mmu/tdp_mmu.c
> > > +++ b/arch/x86/kvm/mmu/tdp_mmu.c
> > > @@ -1385,11 +1385,11 @@ bool kvm_tdp_mmu_wrprot_slot(struct kvm *kvm,
> > > return spte_set;
> > > }
> > >
> > > -static struct kvm_mmu_page *__tdp_mmu_alloc_sp_for_split(gfp_t gfp)
> > > +static struct kvm_mmu_page *__tdp_mmu_alloc_sp_for_split(void)
> > > {
> > > + gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO;
> > > struct kvm_mmu_page *sp;
> > >
> > > - gfp |= __GFP_ZERO;
> > >
> > > sp = kmem_cache_alloc(mmu_page_header_cache, gfp);
> >
> > This can more simply and cleary be:
> >
> > sp = kmem_cache_zalloc(mmu_page_header_cache, GFP_KERNEL_ACCOUNT);
>
> Will do. And I assume you'd prefer get_zeroed_page(GFP_KERNEL_ACCOUNT)
> as well below?
Ah, yeah, good catch!
prev parent reply other threads:[~2024-06-11 16:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 18:11 [PATCH v3] KVM: x86/mmu: Always drop mmu_lock to allocate TDP MMU SPs for eager splitting David Matlack
2024-06-03 18:13 ` Sean Christopherson
2024-06-11 15:29 ` David Matlack
2024-06-11 16:35 ` Sean Christopherson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zmh81J7eflG-aj4X@google.com \
--to=seanjc@google.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=maobibo@loongson.cn \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.