From patchwork Tue Oct 23 07:02:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 10652777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58D9113BF for ; Tue, 23 Oct 2018 07:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DC9529305 for ; Tue, 23 Oct 2018 07:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 124612930D; Tue, 23 Oct 2018 07:16:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B66229305 for ; Tue, 23 Oct 2018 07:16:10 +0000 (UTC) Received: from localhost ([::1]:38520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEqvB-0000Qu-RU for patchwork-qemu-devel@patchwork.kernel.org; Tue, 23 Oct 2018 03:16:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEqm3-0008Ne-Tf 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 1gEqie-0003uh-F8 for qemu-devel@nongnu.org; Tue, 23 Oct 2018 03:03:17 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:52518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEqie-0003g6-0H for qemu-devel@nongnu.org; Tue, 23 Oct 2018 03:03:12 -0400 Received: by mail-wm1-x333.google.com with SMTP id 189-v6so532958wmw.2 for ; Tue, 23 Oct 2018 00:02:58 -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; bh=B8RRMg1uQ8ryYToH2dc8tjt4aoExa387I9SemHFkL0I=; b=ROcy/TaKIM2Jwd0bBYGWGDPkYAFAxXCUu3jK6IMCv38+LgLwG9Sti029ToY2TvyjYo 5btELnY47wV3jvigh0ZYArW7fUvrn+Hh4/c5w3olcdJY4VsGnnXIZ5UVMgEirDEcMiI1 yThHx9/X0qJNbF5dKBtiGKnj8otuvWNQC4RNQ= 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; bh=B8RRMg1uQ8ryYToH2dc8tjt4aoExa387I9SemHFkL0I=; b=I2mx1V5ZSkC6uSML0Q+MPdg45xKuSqnUvYx8m66sIGKWHibvAOev8Xd83xEzY5OVhH KU2v540jx55u+coW2eEqS//j2nAhqUN5bKMf2UQsbfggx1tyfn7eWStJrmA6AQQ6LfHp 8gYIlMpVcD6kWYhlwF2sIemheM8ndRC6mMJXM1/czgJe+FKxlaHXpFZqQaIcnU6/9BNe N4HtTnWsFtcI4dqwBqn90OJo0qo/Ue+yxCd1feQ9VTvq+wtfRrdjLhGrXyxG/ne9hzx+ iCaEo91tipaMYRS1D10RDouBDQiP2qsqjSw5P8hj6PSV+6pnkFKTvAN+Eg5q2ozq7ys/ Rjpw== X-Gm-Message-State: ABuFfoiAiXvTgwuJDm6mr+d2QwMhngN0UY83n4yQzWMoGr+yLE35YrtY khNz7q0bi3aoqI1NiaBRzX3dERXuNUk= X-Google-Smtp-Source: ACcGV61JvaQYnJVleGJ0KXrbjDGCThZceunfoi7yVA8BNVMdEmt36jBAOm3yKznuvx6LC1Jm6zOJ1w== X-Received: by 2002:a1c:8181:: with SMTP id c123-v6mr15599405wmd.3.1540278176855; Tue, 23 Oct 2018 00:02:56 -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.02.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Oct 2018 00:02:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 23 Oct 2018 08:02:42 +0100 Message-Id: <20181023070253.6407-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::333 Subject: [Qemu-devel] [PATCH 00/10] cputlb: track dirty tlbs and general cleanup 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The motivation here is reducing the total overhead. Before a few patches went into target-arm.next, I measured total tlb flush overhead for aarch64 at 25%. This appears to reduce the total overhead to about 5% (I do need to re-run the control tests, not just watch perf top as I'm doing now). The final patch is somewhat of an RFC. I'd like to know what benchmark was used when putting in pending_tlb_flushes, and I have not done any archaeology to find out. I suspect that it does make any measurable difference beyond tlb_c.dirty, and I think the code is a bit cleaner without it. r~ Richard Henderson (10): cputlb: Move tlb_lock to CPUTLBCommon cputlb: Remove tcg_enabled hack from tlb_flush_nocheck cputlb: Move cpu->pending_tlb_flush to env->tlb_c.pending_flush cputlb: Split large page tracking per mmu_idx cputlb: Move env->vtlb_index to env->tlb_d.vindex cputlb: Merge tlb_flush_nocheck into tlb_flush_by_mmuidx_async_work cputlb: Merge tlb_flush_page into tlb_flush_page_by_mmuidx cputlb: Count "partial" and "elided" tlb flushes cputlb: Filter flushes on already clean tlbs cputlb: Remove tlb_c.pending_flushes include/exec/cpu-defs.h | 51 +++++- include/exec/cputlb.h | 2 +- include/qom/cpu.h | 6 - accel/tcg/cputlb.c | 354 +++++++++++++++----------------------- accel/tcg/translate-all.c | 8 +- 5 files changed, 184 insertions(+), 237 deletions(-)