kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] page table bugfix for s390/kvm
@ 2015-04-23 11:08 Christian Borntraeger
  2015-04-23 11:08 ` [PATCH] KVM: s390: remove delayed reallocation of page tables for KVM Christian Borntraeger
  0 siblings, 1 reply; 15+ messages in thread
From: Christian Borntraeger @ 2015-04-23 11:08 UTC (permalink / raw)
  To: Paolo Bonzini, Alexander Graf
  Cc: KVM, Cornelia Huck, Jens Freimann, Martin Schwidefsky,
	Christian Borntraeger

Paolo, Alex,

we plan to submit this fixup via Martins s390 tree (as it is all in
common s390 memory management).

It fixes a fundamental design bug in our page table handling. Some
background: Normal page tables are 2kb. For KVM we need a special page
table extension that creates another 2k after the page table (pgste).
As there are some workloads which have a high page table footprint
(e.g. data  bases with thousands of processes on shared memory), we
want to miminize the impact of the page table extensions to just KVM
processes. Now: our approach of replacing the page table on CREATE_VM
or ENABLE_SIE has a fundamental race to code that gets page table
pointers or ptl locks without holding the pmd lock or page table lock.
So here is another approach: Have a sysctl (with a KCONFIG default)
that decides if we need 4k page tables or 2k page tables.

KVM then needs this sysctl to be set, otherwise CREATE_VM will
return EINVAL.


Martin Schwidefsky (1):
  KVM: s390: remove delayed reallocation of page tables for KVM

 arch/s390/include/asm/mmu.h         |   4 +-
 arch/s390/include/asm/mmu_context.h |   3 +-
 arch/s390/include/asm/pgalloc.h     |   1 +
 arch/s390/include/asm/pgtable.h     |   9 +++
 arch/s390/kvm/Kconfig               |  16 ++++
 arch/s390/mm/pgtable.c              | 142 +++++++++++-------------------------
 6 files changed, 74 insertions(+), 101 deletions(-)

-- 
2.3.0


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

end of thread, other threads:[~2015-04-27 14:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 11:08 [PATCH] page table bugfix for s390/kvm Christian Borntraeger
2015-04-23 11:08 ` [PATCH] KVM: s390: remove delayed reallocation of page tables for KVM Christian Borntraeger
2015-04-23 11:37   ` Alexander Graf
2015-04-23 11:43     ` Christian Borntraeger
2015-04-23 12:01       ` Alexander Graf
2015-04-23 12:08         ` Christian Borntraeger
2015-04-27 13:49           ` Alexander Graf
2015-04-23 12:13         ` Martin Schwidefsky
2015-04-27 13:48           ` Alexander Graf
2015-04-27 13:52             ` Paolo Bonzini
2015-04-27 13:57             ` Martin Schwidefsky
2015-04-27 14:03               ` Alexander Graf
2015-04-27 14:08                 ` Christian Borntraeger
2015-04-23 12:07       ` Paolo Bonzini
2015-04-23 13:57         ` Cole Robinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).