Re: [PATCH -next] KVM: SVM: Remove unnecessary GFP_KERNEL_ACCOUNT in svm_set_nested_state()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux