From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754805AbbFBHrI (ORCPT ); Tue, 2 Jun 2015 03:47:08 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:51932 "EHLO e06smtp11.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754414AbbFBHrA (ORCPT ); Tue, 2 Jun 2015 03:47:00 -0400 Date: Tue, 2 Jun 2015 09:46:40 +0200 From: Dominik Dingel To: Christian Borntraeger , Martin Schwidefsky Cc: linux-kernel@vger.kernel.org, Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , James Hogan , Ralf Baechle , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Heiko Carstens , linux390@de.ibm.com, "David S. Miller" , Chris Metcalf , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andrew Morton , Zhang Zhen , David Rientjes , "Aneesh Kumar K.V" , Nathan Lynch , Andy Lutomirski , Michael Holzheu , Hugh Dickins , Naoya Horiguchi , Paolo Bonzini , "Jason J. Herne" , Davidlohr Bueso , "Kirill A. Shutemov" , Luiz Capitulino , Mike Kravetz , linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 0/5] Remove s390 sw-emulated hugepages and cleanup Message-ID: <20150602094640.4fedc046@BR9TG4T3.de.ibm.com> In-Reply-To: <556C0B5D.40205@de.ibm.com> References: <1432813957-46874-1-git-send-email-dingel@linux.vnet.ibm.com> <556C0B5D.40205@de.ibm.com> Followup-To: linux-mm@kvack.org Organization: IBM X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15060207-0041-0000-0000-000004A1F72E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 01 Jun 2015 09:35:57 +0200 Christian Borntraeger wrote: > Am 28.05.2015 um 13:52 schrieb Dominik Dingel: > > 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 >