mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Huang, Kai" <kai.huang@intel.com>
To: "seanjc@google.com" <seanjc@google.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"zhangxiaoxu5@huawei.com" <zhangxiaoxu5@huawei.com>,
	"liuyongqiang13@huawei.com" <liuyongqiang13@huawei.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH -next] KVM: SVM: Remove unnecessary GFP_KERNEL_ACCOUNT in svm_set_nested_state()
Date: Sat, 24 Aug 2024 09:33:40 +0000	[thread overview]
Message-ID: <e21beaa7c31639f9e8836f963f16c23ee982329f.camel@intel.com> (raw)
In-Reply-To: <Zskil6dbwJmL93cO@google.com>

On Fri, 2024-08-23 at 17:00 -0700, Sean Christopherson wrote:
> On Fri, Aug 23, 2024, Kai Huang wrote:
> > 
> > 
> > On 21/08/2024 11:27 pm, Yongqiang Liu wrote:
> > > The fixed size temporary variables vmcb_control_area and vmcb_save_area
> > > allocated in svm_set_nested_state() are released when the function exits.
> > > Meanwhile, svm_set_nested_state() also have vcpu mutex held to avoid
> > > massive concurrency allocation, so we don't need to set GFP_KERNEL_ACCOUNT.
> > 
> > Hi Sean/Paolo,
> > 
> > Seems more patches are popping up regarding to whether to use _ACCOUNT for
> > temporary memory allocation.  Could we have a definitive guide on this?
> 
> If the allocations are temporary, e.g. scoped to exactly one function, not massive
> (use best judgment), and can't be used in any kind of novel DDoS attack, e.g. are
> limited to one per vCPU or so, then they don't need to be accounted.
> 
> At least, that's my take on things.

That makes sense.  Thanks.

  reply	other threads:[~2024-08-24  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 11:27 Yongqiang Liu
2024-08-23  0:03 ` Huang, Kai
2024-08-24  0:00   ` Sean Christopherson
2024-08-24  9:33     ` Huang, Kai [this message]
2024-08-23 23:47 ` Sean Christopherson

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=e21beaa7c31639f9e8836f963f16c23ee982329f.camel@intel.com \
    --to=kai.huang@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyongqiang13@huawei.com \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zhangxiaoxu5@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®