From patchwork Wed Dec 11 18:30:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 300275 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 44C912C00AC for ; Thu, 12 Dec 2013 05:33:56 +1100 (EST) Received: from localhost ([::1]:59381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqobZ-0003au-Mk for incoming@patchwork.ozlabs.org; Wed, 11 Dec 2013 13:33:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqoVG-0004rR-5X for qemu-devel@nongnu.org; Wed, 11 Dec 2013 13:27:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqoV9-0000Nb-O4 for qemu-devel@nongnu.org; Wed, 11 Dec 2013 13:27:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqoV9-0000NV-BT for qemu-devel@nongnu.org; Wed, 11 Dec 2013 13:27:15 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBBIRDaO013652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Dec 2013 13:27:14 -0500 Received: from redhat.com (vpn1-4-46.ams2.redhat.com [10.36.4.46]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id rBBIRBYJ010407 for ; Wed, 11 Dec 2013 13:27:12 -0500 Date: Wed, 11 Dec 2013 20:30:54 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1386786509-29966-15-git-send-email-mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 15/28] exec: reduce L2_PAGE_SIZE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 f907f5f..67a073c 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)