Re: [PATCH] KVM: s390: remove delayed reallocation of page tables for KVM

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

 




> Am 23.04.2015 um 13:43 schrieb Christian Borntraeger <borntraeger@xxxxxxxxxx>:
> 
>> Am 23.04.2015 um 13:37 schrieb Alexander Graf:
>> 
>> 
>>> Am 23.04.2015 um 13:08 schrieb Christian Borntraeger <borntraeger@xxxxxxxxxx>:
>>> 
>>> From: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
>>> 
>>> Replacing a 2K page table with a 4K page table while a VMA is active
>>> for the affected memory region is fundamentally broken. Rip out the
>>> page table reallocation code and replace it with a simple system
>>> control 'vm.allocate_pgste'. If the system control is set the page
>>> tables for all processes are allocated as full 4K pages, even for
>>> processes that do not need it.
>>> 
>>> Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
>>> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
>> 
>> Couldn't you make this a hidden kconfig option that gets automatically selected when kvm is enabled? Or is there a non-kvm case that needs it too?
> 
> For things like RHEV the default could certainly be "enabled", but for normal
> distros like SLES/RHEL, the idea was to NOT enable that by default, as the non-KVM
> case is more common and might suffer from the additional memory consumption of
> the page tables. (big databases come to mind)
> 
> We could think about having rpms like kvm to provide a sysctl file that sets it if we
> want to minimize the impact. Other ideas?

Oh, I'm sorry, I misread the ifdef. I don't think it makes sense to have a config option for the default value then, just rely only on sysctl.conf for changed defaults.

As far as mechanisms to change it go, every distribution has their own ways of dealing with this. RH has a "profile" thing, we don't really have anything central, but individual sysctl.d files for example that a kvm package could provide.

Either way, the default choosing shouldn't happen in .config ;). Also, please add some helpful error message in qemu to guide users to the sysctl.

As far as alternative approaches go, I don't have a great idea otoh. We could have an elf flag indicating that this process needs 4k page tables to limit the impact to a single process. In fact, could we maybe still limit the scope to non-global? A personality may work as well. Or ulimit?


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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