From patchwork Fri Oct 12 21:41:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 191229 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1E3B62C0094 for ; Sat, 13 Oct 2012 08:41:59 +1100 (EST) Received: from localhost ([::1]:37058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMmzV-0006km-BT for incoming@patchwork.ozlabs.org; Fri, 12 Oct 2012 17:41:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMmzN-0006kY-Tr for qemu-devel@nongnu.org; Fri, 12 Oct 2012 17:41:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMmzM-0004hF-M1 for qemu-devel@nongnu.org; Fri, 12 Oct 2012 17:41:49 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:40581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMmzM-0004h2-Ez for qemu-devel@nongnu.org; Fri, 12 Oct 2012 17:41:48 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so3215013pbb.4 for ; Fri, 12 Oct 2012 14:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=shEEt3Ial4mnLNdNkApBf952rf1fC9DNVrso/2FNY2A=; b=RWA1WdH4omq6bjQkWT/2dr6sHFzX/SpLXyBOHEPsoXOSF12vFrvgknUFaKnToIccH7 Vfm/CtX/6PZjW4pcUTb+yrdZHhFyLPwUGFciMwczX3B7WmiMClA2NUh2HvQQ+deICB9V uM1vI56Vnk1aULbuti0eXNuOOX+4ArN2iuwA2puXjrg5Qt8riiWqJkan+B3EiM26YTr7 Luz5Tyfq4c9ddATzi/Vd1r/gMOcZBN3PhWGyAbeRgq8LXz/s2gGa0l16CAJcjBo7SewS Vj6MbMRLnwUf/ValnjV7gpANbB0pqMjnZh27W1vGgEr58AUNJTGOD8Z+AZHfYRiog4ux bxZg== Received: by 10.66.75.132 with SMTP id c4mr14578592paw.2.1350078107649; Fri, 12 Oct 2012 14:41:47 -0700 (PDT) Received: from anchor.twiddle.home.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id wl4sm4996112pbc.17.2012.10.12.14.41.46 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 14:41:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2012 14:41:41 -0700 Message-Id: <1350078101-7649-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1350076850-7099-1-git-send-email-rth@twiddle.net> References: <1350076850-7099-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: Blue Swirl Subject: [Qemu-devel] [PATCH 5/4] exec: Make MIN_CODE_GEN_BUFFER_SIZE private to exec.c 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 It is used nowhere else, and the corresponding MAX_CODE_GEN_BUFFER_SIZE also lives there. Signed-off-by: Richard Henderson --- exec-all.h | 2 -- exec.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) Dang it, I knew there was something else I was intending to include in the patch set that I sent a moment ago... r~ diff --git a/exec-all.h b/exec-all.h index 6516da0..7f29820 100644 --- a/exec-all.h +++ b/exec-all.h @@ -121,8 +121,6 @@ static inline void tlb_flush(CPUArchState *env, int flush_global) #define CODE_GEN_PHYS_HASH_BITS 15 #define CODE_GEN_PHYS_HASH_SIZE (1 << CODE_GEN_PHYS_HASH_BITS) -#define MIN_CODE_GEN_BUFFER_SIZE (1024 * 1024) - /* estimated block size for TB allocation */ /* XXX: use a per code average code fragment size and modulate it according to the host CPU */ diff --git a/exec.c b/exec.c index 958aebe..096cc56 100644 --- a/exec.c +++ b/exec.c @@ -498,6 +498,10 @@ bool memory_region_is_unassigned(MemoryRegion *mr) # define USE_MMAP #endif +/* Minimum size of the code gen buffer. This number is randomly chosen, + but not so small that we can't have a fair number of TB's live. */ +#define MIN_CODE_GEN_BUFFER_SIZE (1024u * 1024) + /* Maximum size of the code gen buffer we'd like to use. Unless otherwise indicated, this is constrained by the range of direct branches on the host cpu, as used by the TCG implementation of goto_tb. */