Message ID | 20240510065206.76078-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 7F739C25B10 for <linux-mm@archiver.kernel.org>; Fri, 10 May 2024 06:52:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 524B46B009C; Fri, 10 May 2024 02:52:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 463666B009B; Fri, 10 May 2024 02:52:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EF346B0099; Fri, 10 May 2024 02:52:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id F165D6B0098 for <linux-mm@kvack.org>; Fri, 10 May 2024 02:52:24 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7106181779 for <linux-mm@kvack.org>; Fri, 10 May 2024 06:52:24 +0000 (UTC) X-FDA: 82101567408.05.152CB97 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf30.hostedemail.com (Postfix) with ESMTP id DE23D80009 for <linux-mm@kvack.org>; Fri, 10 May 2024 06:52:19 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.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=1715323942; 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=CmKo+Qes+ApyBvy+wRevo+t3ePQZu2OoUHH/ub4twUM=; b=hIkaXHAPHXzPfEcnc18RAbFBC8PFJW1Xb1sOZz62ZSXw2qKEVPOxYxi4qo3RMTajLjsdvo E7XseNL3Nh/FjsW9DQoZryvPgszV3vwQBlDzpSXzNN2mmnzrOYKf577siwrUQqGEx6fyK8 k+LPuTmEBSWRsegYXSpOhSISS07wxtU= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf30.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=1715323942; a=rsa-sha256; cv=none; b=l7jqldFmkJjDe/8uzaXeN956Yc8IQX2zN2zl1ybJOX0sdQVyY8h53HciN7m5UhesKUO9FN WEgE/Gdy9CB/JCJXecmJ5a+77V5fhxKOlV0+q6uYXWkFyGiW9Uzt7b30vh8MTDWhJSnFgs SxGhT+W6YVdi05gTEywSp7jeSbktf5s= X-AuditID: a67dfc5b-d6dff70000001748-c9-663dc4216273 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 v10 02/12] arm64: tlbflush: add APIs manipulating tlb batch's arch data Date: Fri, 10 May 2024 15:51:56 +0900 Message-Id: <20240510065206.76078-3-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240510065206.76078-1-byungchul@sk.com> References: <20240510065206.76078-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAA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mTz2PRpErvHu3Pn2D1OzPjN4jHvZKDH+31X2TwWv/jA5LH1l51H49RrbB6fN8kF8Edx2aSk 5mSWpRbp2yVwZRxo2MdSsJi34mqragPjb64uRk4OCQETif9nJjGD2GwC6hI3bvwEs0UEzCQO tv5hB7GZBe4ySRzoZwOxhQXCJZ5v+8EEYrMIqErce9sCFucVMJVYfnsSE8RMeYnVGw6AzeEE mvNh2QywuBBQTceDiYwTGLkWMDKsYhTJzCvLTczMMdUrzs6ozMus0EvOz93ECAzjZbV/Ju5g /HLZ/RCjAAejEg/vjs02aUKsiWXFlbmHGCU4mJVEeKtqrNOEeFMSK6tSi/Lji0pzUosPMUpz sCiJ83qFpyYICaQnlqRmp6YWpBbBZJk4OKUaGB+8UK0JK5gwZdb0TcdLI2xl9t4y2LzKyu1P 5zIdeYWcHVsWHb45UcZu8pkI3+epxvMrPS85p199qzXjcrHitZ7jk9a6Hniy/8iFeQcnC9a8 TrDSFrnpIXDuGMOWCULrjqks/8gt0Lx4wpEvH1ce+MHiWq8Rsn3pfa2lX5fEPdmdZn7U3yLl gNQGJZbijERDLeai4kQAKk35H18CAAA= X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: DE23D80009 X-Stat-Signature: zhjf8ews1jit71pwhhmcio11etwebpos X-HE-Tag: 1715323939-924102 X-HE-Meta: U2FsdGVkX1/CLdRLtWSMX1qEA3Eld7iX7sthgcBOUpv7pSD3D700qtvlsXQ/mH3RCl0snsgntPo4bdb9RESs1LHPRgH4RkTu9vvJtERr/BcdzsWb8JhCArjvcxttp/IhSGOZn5n0KyS+nszQ6du+EhOfWk+SAJzEhZXc4x/Racr/BprXRC26UNJSoGrm2so7t2pAuRaeuoOeuny9AC5QE4M+zTK2HamUx1lGAl/6w8uTvj3nxkYRFG0N4aU8bzlpv8isBH9SYHXgcZNFIyRao2wqaZc4hS95F7wUF41o5D6jbrm21v0Jg0HL0YGqxfQpyIyt5H0G/AhBLicl1rc8ZCxuvfDU0+zjuMmTB8Nq3cn5WCv2xAP6iPZL21DMeZdi1KYTzrJCt93L6h490K809VDEac0eU8kZlgULSpJ2Rblg2RXJo4ehXQo2ALx7pwlaDUekZWgQg5VLeb+CAWDjwHI6DuSvQ/4Xz6vVZUb6Cc8zqrWJTtWdbuLcsQPx9T9+8AaZP6L4ByEcIG8bQAv9SkzoNA7Zxrk8qPBd2B5gL+Wo5cTkdGJSnQIAiyUGlk+ueLYcThyAFMNabw1ZegBM9aVDIP/D5H/w1saBLYo4cWXeiaIgqVnQLROk9ZQNObuK4RNqLhWND+F+f5dLquogM+oRvE34vjMkDtgBKrCfm5dPa9F5dzL0zkb/CIZUm7UlF15gDgpvDduBqVwpgarN22GEHAF+yle4p8dhrarbgrzWKYRdttTdwIcPPiiR8ULhbHECV8LehknPMYzXPBfm/SOD3soZGNyuxxlQsx/kepRjbnMsT8rbC2j8wy4IN8uZ8i+HJbz1m67S9Wex18UxoHmmOKyQxkjWIBj1vgOgwebiHT7h2+fi35BH36CO0N+URWqjuCwWtV6bl9zM+5wyU1euQyHbn6Mj8NFqoDZGsIpeB+vTX+X1Dov4CboKFOpJNGCklPmuXAauzJCDXEN L3w== 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 a75de2665d84..b8c7fbc1c68e 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -347,6 +347,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(+)