Re: [kvm PATCH 1/1] kvm: Make VM ioctl do a vzalloc instead of a kzalloc

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

 




On 04/23/2018 09:41 AM, Christian Borntraeger wrote:
> 
> 
> On 04/21/2018 12:07 AM, Marc Orr wrote:
>> First off---thanks for reviewing my patch!
>>
>> With respect to the size of the struct, here's what I'm seeing on an
>> upstream
>> version of the kernel:
>>
>> (gdb) p sizeof(struct kvm)
>> $1 = 42200
>> (gdb) p sizeof(struct kvm_arch)
>> $2 = 35496
> 
> Yes, I looked at an older kernel on x86. Sorry about that. The newer kernels
> certainly have grown. Would be interesting to see why. Can you run
> pahole (usually in the package dwarves) on you kernel and search for 
> "struct kvm "

Seems to be 
        struct hlist_head          mmu_page_hash[4096];  /*    24 32768 */

in kvm_arch. 

This is now much larger mostly due to 

commit 114df303a7eeae8b50ebf68229b7e647714a9bea
    kvm: x86: reduce collisions in mmu_page_hash


So maybe it is enough to allocate mmu_page_hash seperately? Adding David Matlack
for opinions.




[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