Message ID | 20240531092001.30428-3-byungchul@sk.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7280C25B75 for <linux-mm@archiver.kernel.org>; Fri, 31 May 2024 09:20:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DF0AD6B009B; Fri, 31 May 2024 05:20:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BA5276B009C; Fri, 31 May 2024 05:20:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A1CEB6B009D; Fri, 31 May 2024 05:20:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 833FC6B009C for <linux-mm@kvack.org>; Fri, 31 May 2024 05:20:18 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 06ABB1A045D for <linux-mm@kvack.org>; Fri, 31 May 2024 09:20:18 +0000 (UTC) X-FDA: 82178144916.29.98C047E Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf08.hostedemail.com (Postfix) with ESMTP id 188A0160015 for <linux-mm@kvack.org>; Fri, 31 May 2024 09:20:15 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717147216; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=cqHgsKtVwaSvlB9DKtU3WH28TLrEXnxe/c3rvazlg90=; b=YYHQt95GR8EhtTk062bLfInhaTHs/5UzBI4LqJy+4Wczpe50o7qqNP1MhS54EZ7G/6z82t aOVEQlJRBUyWpKS3jKj0sTce1I9zIzWfbNMysvdExszaFfIYn8vUL3914/nfN+Xa7AuCgj sqiB+qokTOSAP33NHKmQFsqd6DizfhA= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717147216; a=rsa-sha256; cv=none; b=F1mB15yU8AeA7TSKtVqX6Ft21oM/lhYWWNTUH0ywS8H756whk4fuqddxEKOysDS3SsyLXs SK3j1dtnc4RIPSOGDldAChMbQLid7tkAkwCHU+XhxqO7kRo1iB/xySHDXFQv2usS4xHJQN k22YRmQ5Jm9t8NUiaqJW8yscAQ1C/IU= X-AuditID: a67dfc5b-d85ff70000001748-48-6659964bd3bd From: Byungchul Park <byungchul@sk.com> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: kernel_team@skhynix.com, akpm@linux-foundation.org, ying.huang@intel.com, vernhao@tencent.com, mgorman@techsingularity.net, hughd@google.com, willy@infradead.org, david@redhat.com, peterz@infradead.org, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, rjgolo@gmail.com Subject: [PATCH v11 02/12] arm64: tlbflush: add APIs manipulating tlb batch's arch data Date: Fri, 31 May 2024 18:19:51 +0900 Message-Id: <20240531092001.30428-3-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240531092001.30428-1-byungchul@sk.com> References: <20240531092001.30428-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+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B4nZvxm8Zh3MtDj/b6rbB6LX3xg8tj6y86jceo1No/Pm+QC+KO4bFJS czLLUov07RK4MlbPvclasJi34vXOOWwNjL+5uhg5OSQETCSe/G1mBrHZBNQlbtz4CWaLCJhJ HGz9ww5iMwvcZZI40M8GYgsLhEvMv7GFCcRmEVCV+Pl/AyuIzStgKvFu/z9GiJnyEqs3HACb wwk058DfO2BxIaCaRf97GScwci1gZFjFKJKZV5abmJljqlecnVGZl1mhl5yfu4kRGMjLav9M 3MH45bL7IUYBDkYlHt6Aiog0IdbEsuLK3EOMEhzMSiK8v9KBQrwpiZVVqUX58UWlOanFhxil OViUxHm9wlMThATSE0tSs1NTC1KLYLJMHJxSDYzs8SUfWOdEqJStvKazdV30GRV17tOvNeK+ q3v4nty0ot5g9oIHkfriHrLWXsW/wr/7M9hKOOq0SRgaBOzMOBuXVcP/Iu2MWtREhh1L+zc/ 8tzIasMtHlyr+qle61Dt/fXXZNxaZ81TmqFhlJddcnSf76wKgy+7exLlNbKClSa/mSD5iH1J nBJLcUaioRZzUXEiAFDjtkNgAgAA X-CFilter-Loop: Reflected X-Stat-Signature: 6b6w96bwrx6x7fuhbksiubznhmj4bqwo X-Rspamd-Queue-Id: 188A0160015 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1717147215-87601 X-HE-Meta: U2FsdGVkX19hjsG0dlPA+EYpsakLUHBJzlEJFsAFg7jsSisamRhIXQu5Xj5K73qRhypFxiTbnaMgycHBuohMbFNFvXpCxBZriE1if/fpWatxsH/+Lo77CaYNMdX4JHTeQ/GxxFPQNecpEH+00EKEnpvBz1O4J76MjsMgpMfSC54CZw9U7bNYFAEY3TIX3g1Y5AgewrmQ9ziWIk7LiFMN4R4/X22/jZcaMRXOUzMOxq3LUvic/QgOVyLh0Xzj3gYZUDo4/jYhcdM0gKXkchxMsqBidmMVgUpoEfdUHPBuYCsTlNLDdQK2bCEFkyyj3wJYSWMh/1YG4rmGz6aWKsjKQ4cX2MX0iNTCdXojG7YeRPI6O/RokDTy9IczpSQnDfpxzydFWFEFc7r3e5LGPWTFvDeiCTVqvRWG7WScGmracPsAQo600dfJynco5O5Tp46YW8ltSSxW234M6p4oclrYRgxb5ZeYWlbnV4r4xYtyuDN34pw9kdzcH5aEKNFPI0XwAhQNipQA+QrsKwWbWvs6akTyk24Hwlc72OSiOOmQPUpu0+aiTf8trcEaucI+ajput4LTCS+5uYfNmfdbiwEllxuO8hf7e650qsfGaD2YS1EOCd++uMEYUFNQ98Q/ZsDH8MnG2KpdGGxxwXSEZoNZNgHzK7SSP7o0eYAvOenVNT1dTmfJTK5Jvt/sE0cDmd6BZn95ApO7HKheilF529T0Myl5/jTpeyYan6puAKYok6TyiCPhjQP/J1BQD+96d8i/5QvZVUQ4qBW4G57GFFIeQSXPEmTJabQe/eeRHGoigtAyYbDBTcGykIeDkv0j3L9BPFyYVsXBLkODa3/8ENKmv8Gg3p9o+KG2olQV33i5eVfiHCBgpM5FfpcFngDHPCoEZIcprpzJEkLkT0kqGa4ZsAFJpSxhEaU0sJaHI41LNImpCtl8UmKk4+rncDnQAjBITI1mAotF7tlWOA5TNTv rjXhOgtO nPMRlaYLpFq55aRlQVXsQfvFFew8zOjJky61mw9r7WrjVOTv9XsCZU+oVAZ07N53rgaB+Tfwj6dCHp1wuOunN7jnf2Z4XOPrkuAS9 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
LUF(Lazy Unmap Flush) reducing tlb numbers over 90%
|
expand
|
diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index 95fbc8c05607..4fefc1f90304 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -354,6 +354,24 @@ static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) dsb(ish); } +static inline void arch_tlbbatch_clear(struct arch_tlbflush_unmap_batch *batch) +{ + /* nothing to do */ +} + +static inline void arch_tlbbatch_fold(struct arch_tlbflush_unmap_batch *bdst, + struct arch_tlbflush_unmap_batch *bsrc) +{ + /* nothing to do */ +} + +static inline bool arch_tlbbatch_done(struct arch_tlbflush_unmap_batch *bdst, + struct arch_tlbflush_unmap_batch *bsrc) +{ + /* Kernel can consider tlb batch always has been done. */ + return true; +} + /* * This is meant to avoid soft lock-ups on large TLB flushing ranges and not * necessarily a performance improvement.
A new mechanism, LUF(Lazy Unmap Flush), defers tlb flush until folios that have been unmapped and freed, eventually get allocated again. It's safe for folios that had been mapped read only and were unmapped, since the contents of the folios don't change while staying in pcp or buddy so we can still read the data through the stale tlb entries. This is a preparation for the mechanism that requires to manipulate tlb batch's arch data. Even though arm64 does nothing for tlb things, arch with CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH should provide the APIs. Signed-off-by: Byungchul Park <byungchul@sk.com> --- arch/arm64/include/asm/tlbflush.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)