From patchwork Thu Aug 30 16:15:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 10582239 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 BEF8F14E1 for ; Thu, 30 Aug 2018 16:17:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACD142C0F7 for ; Thu, 30 Aug 2018 16:17:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A02A82C0FA; Thu, 30 Aug 2018 16:17:01 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1615C2C0F7 for ; Thu, 30 Aug 2018 16:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=kHPjEhOxyDhTC88gxSeYDAAuDFRBDxY0/vOF+kDCMfM=; b=YYD w20sTJSyDb2eCqiBmetLNULPZuBHvEeA5nILCj9C1UE9Ig/zz+o+WTW8ssQyBD4lobFG5b/d3N5X6 4T09e9PPWpslBwaWVUYWT/VgvLILNZY/pl+Lvb4ya6tV++ZwXDGje/LUIJTmdyamiGY+Cl6ldZ7VO 7BXvAULsWS0ioh/5lB4mMAZospaJuWxXfjsXuUqbEVgIaonfSslShYbEUSnyNQq5G0tgs/6Szh6fE FoAgtFzSsX4ijXKAnr9jXUDSnSX9j4++kyCt+wRWCDbGZJ+Vnw7jY9a+qLkKWArtg0dO5oIplInkd YRdpfw99+0Ke6XAYSmeU9ht3Z3FfS5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPcp-00050F-T8; Thu, 30 Aug 2018 16:16:52 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPbz-0004TX-8p for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 16:16:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F41E718A; Thu, 30 Aug 2018 09:15:48 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C482D3F557; Thu, 30 Aug 2018 09:15:48 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 0DC661AE3614; Thu, 30 Aug 2018 17:16:01 +0100 (BST) From: Will Deacon To: linux-kernel@vger.kernel.org Subject: [PATCH 00/12] Avoid synchronous TLB invalidation for intermediate page-table entries on arm64 Date: Thu, 30 Aug 2018 17:15:34 +0100 Message-Id: <1535645747-9823-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_091559_348788_C02BE7D6 X-CRM114-Status: GOOD ( 11.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: benh@au1.ibm.com, peterz@infradead.org, catalin.marinas@arm.com, Will Deacon , npiggin@gmail.com, torvalds@linux-foundation.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello again, This is v1 of the RFC I previously posted here: http://lists.infradead.org/pipermail/linux-arm-kernel/2018-August/597821.html The main changes include: * Rewrite the comment in tlbflush.h to explain the various functions and justify the barrier semantics * Fix the "flush entire ASID" heuristic to work with !4K page sizes * Fixed the build on sh (well, it fails somewhere else that isn't my fault) * Report PxD_SHIFT instead of PxD_SIZE via tlb_get_unmap_shift() It's also had a lot more testing, but has held up nicely so far on arm64. I haven't figured out how to merge this yet, but I'll probably end up pulling the core changes out onto a separate branch. Cheers, Will --->8 Peter Zijlstra (1): asm-generic/tlb: Track freeing of page-table directories in struct mmu_gather Will Deacon (11): arm64: tlb: Use last-level invalidation in flush_tlb_kernel_range() arm64: tlb: Add DSB ISHST prior to TLBI in __flush_tlb_[kernel_]pgtable() arm64: pgtable: Implement p[mu]d_valid() and check in set_p[mu]d() arm64: tlb: Justify non-leaf invalidation in flush_tlb_range() arm64: tlbflush: Allow stride to be specified for __flush_tlb_range() arm64: tlb: Remove redundant !CONFIG_HAVE_RCU_TABLE_FREE code asm-generic/tlb: Guard with #ifdef CONFIG_MMU asm-generic/tlb: Track which levels of the page tables have been cleared arm64: tlb: Adjust stride and type of TLBI according to mmu_gather arm64: tlb: Avoid synchronous TLBIs when freeing page tables arm64: tlb: Rewrite stale comment in asm/tlbflush.h arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pgtable.h | 10 +++- arch/arm64/include/asm/tlb.h | 34 +++++------- arch/arm64/include/asm/tlbflush.h | 112 ++++++++++++++++++++++++-------------- include/asm-generic/tlb.h | 85 +++++++++++++++++++++++++---- mm/memory.c | 4 +- 6 files changed, 168 insertions(+), 78 deletions(-) Acked-by: Peter Zijlstra (Intel)