Thread (10 messages) 10 messages, 4 authors, 2015-06-04

Re: [PATCH 0/5] Remove s390 sw-emulated hugepages and cleanup

From: Dominik Dingel <hidden>
Date: 2015-06-02 07:47:08
Also in: linux-arm-kernel, linux-mips, linux-sh, lkml, sparclinux

On Mon, 01 Jun 2015 09:35:57 +0200
Christian Borntraeger [off-list ref] wrote:
Am 28.05.2015 um 13:52 schrieb Dominik Dingel:
quoted
Hi everyone,

there is a potential bug with KVM and hugetlbfs if the hardware does not
support hugepages (EDAT1).
We fix this by making EDAT1 a hard requirement for hugepages and 
therefore removing and simplifying code.
The cleanup itself is nice and probably the right thing to do. 
Emulating large pages makes the code more complex and asks for
trouble (as outlined above)

The only downside that I see is that z/VM as of today does not
announce EDAT1 for its guests so the "emulated" large pages for
hugetlbfs would be useful in that case. The current code allocates
the page table only once and shares it for all mappers - which is
useful for some big databases that spawn hundreds of processes with
shared mappings of several hundred GBs. In these cases we do save
a decent amount of page table memory. 
To limit the damage done, we could always allocate page tables with pgstes for that case.
That would allow one guest manipulating another guests storage keys,
but at least would prevent random memory overwrites in the host.

Another thing we could do, make software emulated large pages a kernel config option
and only if KVM is not selected allow it, visa versa.

@Martin what do you think?

Thanks,
	Dominik
Not sure if that case is actually important, though.

Christian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help