Re: [PATCH] KVM: replace large kvmalloc allocation with vmalloc

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

 



On 15/10/21 19:28, Sean Christopherson wrote:
  	for (i = 0; i < KVM_PAGE_TRACK_MAX; i++) {
  		slot->arch.gfn_track[i] =
-			kvcalloc(npages, sizeof(*slot->arch.gfn_track[i]),
-				 GFP_KERNEL_ACCOUNT);
+			vcalloc(npages, sizeof(*slot->arch.gfn_track[i]));
This loses the memcg accounting, which is somewhat important for the theoretical
4MiB allocations:-)

True, and in fact 4 MiB is not so theoretical.

Maybe split out the introduction of vcalloc() to a separate patch (or two) and
introduce additional helpers to allow passing in gfp_t to e.g. __vzalloc()?

Yes, this is what actually slowed me down this week.This is the bare minimum that I can send to Linus right now to avoid the WARN.

I have patches to clean all of this up, but they will have to go throw Andrew Morton; he will decide whether to throw them in 5.15 or go through stable, but anyway 5.16.1 or .2 should have the accounting back at most.

Paolo




[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