From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 06/17] Use statfs to determine size of huge pages Date: Mon, 18 May 2009 15:22:57 +0200 Message-ID: <20090518132257.GA9835@amd.com> References: <1242574999-20887-1-git-send-email-aliguori@us.ibm.com> <1242574999-20887-7-git-send-email-aliguori@us.ibm.com> <4A1042B8.2010407@redhat.com> <20090518090230.GZ9835@amd.com> <4A115E44.4050505@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Avi Kivity , kvm@vger.kernel.org, Glauber Costa To: Anthony Liguori Return-path: Received: from tx2ehsobe002.messaging.microsoft.com ([65.55.88.12]:31354 "EHLO TX2EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755214AbZERNXS convert rfc822-to-8bit (ORCPT ); Mon, 18 May 2009 09:23:18 -0400 Content-Disposition: inline In-Reply-To: <4A115E44.4050505@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 18, 2009 at 08:10:28AM -0500, Anthony Liguori wrote: > Joerg Roedel wrote: >> On Sun, May 17, 2009 at 08:00:40PM +0300, Avi Kivity wrote: >> =20 >>> Anthony Liguori wrote: >>> =20 >>>> From: Joerg Roedel >>>> >>>> The current method of finding out the size of huge pages does not = work >>>> reliably anymore. Current Linux supports more than one huge page s= ize >>>> but /proc/meminfo only show one of the supported sizes. >>>> To find out the real page size used can be found by calling statfs= =2E This >>>> patch changes qemu to use statfs instead of parsing /proc/meminfo. >>>> =20 >>> Since we don't support 1GBpages in stable-0.10, this is unneeded. >>> =20 >> >> This patch is needed to run current KVM on a hugetlbfs backed with >> 1GB pages. Therefore I think this patch is needed. It is an improvem= ent >> over the /proc/meminfo parsing anyway and is not strictly related to >> kvm kernel support for 1GB pages. >> =20 > > Is there any userspace support requirements for 1GB pages? The /proc/meminfo parsing code breaks when current KVM is run with a -mempath on a 1GB backed hugetlbfs. > That is, if you had a 2.6.31 kernel and stable-0.10, would 1GB pages = =20 > work (assuming this patch is backported)? With this patch and kvm kernel support 1GB pages will work. Another patch is needed to make it more easy to enable the pdpe1gb cpuid bit in the guest. Joerg --=20 | Advanced Micro Devices GmbH Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei M=FCnchen System |=20 Research | Gesch=E4ftsf=FChrer: Thomas M. McCoy, Giuliano Meroni Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis M=FCnchen | Registergericht M=FCnchen, HRB Nr. 43632