From patchwork Tue Oct 23 07:02:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 149427 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp349355ljp; Tue, 23 Oct 2018 00:13:05 -0700 (PDT) X-Google-Smtp-Source: AJdET5dKmmuS7Zec+9CB5PshDGRpvrIrfg6GoMQWhCNqNt2z2IaHP/o7hpaMO0oMLdlOl2aZySIX X-Received: by 2002:a0c:c38d:: with SMTP id o13mr6600062qvi.100.1540278785871; Tue, 23 Oct 2018 00:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540278785; cv=none; d=google.com; s=arc-20160816; b=ND2c/SO01wCkwcUxfZC5AaMxostfFnshP92nczwuy9RBF4nl64vdiVHfg7oFCHAUUF DHBv30zag+9kwysG6UCYw2h/cWW8QNBliznnOz7LWd8jvNZAam5a7SHNSDJOk01rR6tB Pt86IwCofyc7+Xvi8mDjdEWLMGBvk1DTbkIcghnEjHZ0HiqzMa7E75CaKcEfrYV3+vU4 lRRJBxPLOOnf7GQLkRASBtqL2NJL07b4x0z7IjoVR7WkuC6mIlJIafWyB4vXQ8vAOb5c ugsTldPZPF9E+dcv0TRc4x0YnpLRYLqPaNgpiNMzANmWLiLRfeAUZPpIGiAS6SDApKf7 mXSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=j5xnUIyTOJGIGy9FEJsc6tCQO/KhtXScq8nSq+BVdsM=; b=xp2Pu7p5TZQ51Ad2YAwEsogJ0VyKQB+sszgBKDrNs76UUvKAVxVLxQaU58kIxCtrc3 4PH05F+nPcNWbhD9aO65OemlimbbRl1hLIdRVs0ia1fB1s/R6KQkeCMjxqOESP8ZqXhR pW2x/B+oeHbZ9nt75sYigYoQCDrqIE8Hk+pFyDhnpI/MzGv6nrR77OwUkmejfWqNCpEk PQC+YYZ6UoPEiIZkNWndEqaVBI9+tErusnylv+jc0sDkrvVrNMmj/vYfV5s7tuiR63N9 vzhgSen7at7MmYYRuymnU4+mJHph7J1/Wfk3TSVgHZxp/xRciWro7hVQSKduWvNsKNzt Q0gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bwxc7xLL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k19si340319qvg.219.2018.10.23.00.13.05 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 23 Oct 2018 00:13:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bwxc7xLL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEqsD-0005u0-AT for patch@linaro.org; Tue, 23 Oct 2018 03:13:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEqm3-0008Nf-HZ for qemu-devel@nongnu.org; Tue, 23 Oct 2018 03:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEqig-0003xk-3E for qemu-devel@nongnu.org; Tue, 23 Oct 2018 03:03:17 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44866) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEqif-0003wn-S2 for qemu-devel@nongnu.org; Tue, 23 Oct 2018 03:03:14 -0400 Received: by mail-wr1-x444.google.com with SMTP id q6-v6so348027wrw.11 for ; Tue, 23 Oct 2018 00:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j5xnUIyTOJGIGy9FEJsc6tCQO/KhtXScq8nSq+BVdsM=; b=bwxc7xLLLxDnD7rpffqvrPhnLAKagjQzYbdqUjlh1hJF3Cr1Gmrd8WNaAEQ5ox/65B Zx2lfaIT2mXUREaONSx2ZvXEYN8AM236Kk2bFTBMzYOokVhiGaNzodZdILKohUDUQUPa mxONefrjMhpjbXqfYkNckdNWwCBX1VL3pPu1E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j5xnUIyTOJGIGy9FEJsc6tCQO/KhtXScq8nSq+BVdsM=; b=sRFcr+27ydezjiTOua+qPR95hf1hGIacTOoT4ZxYDQ8UEuLuzWYV7ULstL0wXusZqI 7RhXxtvTGbk5ZOfeygv7QJGHDkv4GJbhPAWFVm2Ck7in6/uYMoevqoI7aiA4EyTORry3 TKGtvGKZ/ZGCMHnqFR6PEzc3aqMz5czsFc9Nu9/AOuJYCiXC31wPwa4YZwC/uLI1IUqH vdUQ0PXqXdijq0AHL7c1dOzDGO32bdqV7IkFRaPoky6xfADzOiOTb6DHRxuEuOMlnaUT q2ZN0esnVdFUUnymf+QFn+f6C3om2IDqo1t0PDMHZGUMuADK7AC3hyUhtFLw73lrQtgl j15g== X-Gm-Message-State: AGRZ1gItTNdhGnhkYgYy3XrrNqCfZCaHYG4g1M7kugY2bb20S3YXByDl DwWZuF+5MxLq7Af/qvrr69acAcSddYM= X-Received: by 2002:adf:9c0a:: with SMTP id f10-v6mr837456wrc.93.1540278192653; Tue, 23 Oct 2018 00:03:12 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (host86-153-40-62.range86-153.btcentralplus.com. [86.153.40.62]) by smtp.gmail.com with ESMTPSA id t13-v6sm258355wrn.22.2018.10.23.00.03.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Oct 2018 00:03:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 23 Oct 2018 08:02:53 +0100 Message-Id: <20181023070253.6407-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181023070253.6407-1-richard.henderson@linaro.org> References: <20181023070253.6407-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 10/10] cputlb: Remove tlb_c.pending_flushes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cota@braap.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is essentially redundant with tlb_c.dirty. [??? Collect data to back up this supposition] Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 6 ------ accel/tcg/cputlb.c | 16 ++-------------- 2 files changed, 2 insertions(+), 20 deletions(-) -- 2.17.2 diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index ca0fea8b27..6a60f94a41 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -160,12 +160,6 @@ typedef struct CPUTLBDesc { typedef struct CPUTLBCommon { /* Serialize updates to tlb_table and tlb_v_table, and others as noted. */ QemuSpin lock; - /* - * Within pending_flush, for each bit N, there exists an outstanding - * cross-cpu flush for mmu_idx N. Further cross-cpu flushes to that - * mmu_idx may be discarded. Protected by tlb_c.lock. - */ - uint16_t pending_flush; /* * Within dirty, for each bit N, modifications have been made to * mmu_idx N since the last time that mmu_idx was flushed. diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index c1b92083d4..fec37bd3bd 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -174,20 +174,8 @@ void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxmap) tlb_debug("mmu_idx: 0x%" PRIx16 "\n", idxmap); if (cpu->created && !qemu_cpu_is_self(cpu)) { - CPUArchState *env = cpu->env_ptr; - uint16_t pending, to_clean; - - qemu_spin_lock(&env->tlb_c.lock); - pending = env->tlb_c.pending_flush; - to_clean = idxmap & ~pending; - env->tlb_c.pending_flush = pending | idxmap; - qemu_spin_unlock(&env->tlb_c.lock); - - if (to_clean) { - tlb_debug("reduced mmu_idx: 0x%" PRIx16 "\n", to_clean); - async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work, - RUN_ON_CPU_HOST_INT(to_clean)); - } + async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work, + RUN_ON_CPU_HOST_INT(idxmap)); } else { tlb_flush_by_mmuidx_async_work(cpu, RUN_ON_CPU_HOST_INT(idxmap)); }