Received: from eggs.gnu.org ([2001:4830:134:3::10]:39081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgfzz-000820-Hv for qemu-devel@nongnu.org; Wed, 13 Nov 2013 14:21:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgfzt-0005xC-Jq for qemu-devel@nongnu.org; Wed, 13 Nov 2013 14:21:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgfzt-0005x0-At for qemu-devel@nongnu.org; Wed, 13 Nov 2013 14:21:05 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rADJL40B012483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Nov 2013 14:21:04 -0500 Date: Wed, 13 Nov 2013 21:24:04 +0200 From: "Michael S. Tsirkin" Message-ID: <1384370613-6433-8-git-send-email-mst@redhat.com> References: <1384370613-6433-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1384370613-6433-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PATCH v2 7/7] exec: reduce L2_PAGE_SIZE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Luiz Capitulino With the single exception of ppc with 16M pages, we get the same number of levels with L2_PAGE_SIZE = 10 as with L2_PAGE_SIZE = 9. by doing this we reduce memory footprint of a single level in the node memory map by 2x without runtime overhead. Signed-off-by: Michael S. Tsirkin --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 6e64d27..7d3f743 100644 --- a/exec.c +++ b/exec.c @@ -96,7 +96,7 @@ struct PhysPageEntry { /* Size of the L2 (and L3, etc) page tables. */ #define ADDR_SPACE_BITS 64 -#define P_L2_BITS 10 +#define P_L2_BITS 9 #define P_L2_SIZE (1 << P_L2_BITS) #define P_L2_LEVELS (((ADDR_SPACE_BITS - TARGET_PAGE_BITS - 1) / P_L2_BITS) + 1) -- MST