public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: account allocation in generic version of kvm_arch_alloc_vm()
@ 2022-11-17 20:34 Alexey Dobriyan
  2022-11-18 17:30 ` Sean Christopherson
  2023-01-19 21:04 ` Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2022-11-17 20:34 UTC (permalink / raw)
  To: pbonzini; +Cc: kvm, adobriyan

This is persistent allocation and arch-specific versions account it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/kvm_host.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1466,7 +1466,7 @@ int kvm_arch_create_vm_debugfs(struct kvm *kvm);
  */
 static inline struct kvm *kvm_arch_alloc_vm(void)
 {
-	return kzalloc(sizeof(struct kvm), GFP_KERNEL);
+	return kzalloc(sizeof(struct kvm), GFP_KERNEL_ACCOUNT);
 }
 #endif
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: account allocation in generic version of kvm_arch_alloc_vm()
  2022-11-17 20:34 [PATCH] kvm: account allocation in generic version of kvm_arch_alloc_vm() Alexey Dobriyan
@ 2022-11-18 17:30 ` Sean Christopherson
  2023-01-19 21:04 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2022-11-18 17:30 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: pbonzini, kvm

Nit, please capitalize "KVM:" in the shortlog.

On Thu, Nov 17, 2022, Alexey Dobriyan wrote:
> This is persistent allocation and arch-specific versions account it.

The justification isn't that "x86 does it", e.g. the x86 code could be wrong.
The justification is that the allocation is tied to the current task as opposed
to being a KVM-wide allocation.  It's worth calling out that x86 already accounts
its allocation, but that should be a footnote, not the reason for converting the
generic allocation.

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---

With a reworded changelog,

Reviewed-by: Sean Christopherson <seanjc@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: account allocation in generic version of kvm_arch_alloc_vm()
  2022-11-17 20:34 [PATCH] kvm: account allocation in generic version of kvm_arch_alloc_vm() Alexey Dobriyan
  2022-11-18 17:30 ` Sean Christopherson
@ 2023-01-19 21:04 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2023-01-19 21:04 UTC (permalink / raw)
  To: Sean Christopherson, pbonzini, Alexey Dobriyan; +Cc: kvm

On Thu, 17 Nov 2022 23:34:19 +0300, Alexey Dobriyan wrote:
> This is persistent allocation and arch-specific versions account it.
> 
> 

Applied to kvm-x86 generic, thanks!

[1/1] kvm: account allocation in generic version of kvm_arch_alloc_vm()
      https://github.com/kvm-x86/linux/commit/9370e39e6b0a

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-19 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-17 20:34 [PATCH] kvm: account allocation in generic version of kvm_arch_alloc_vm() Alexey Dobriyan
2022-11-18 17:30 ` Sean Christopherson
2023-01-19 21:04 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox