Message ID | 20240520021734.21527-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 8744CC25B7A for <linux-mm@archiver.kernel.org>; Mon, 20 May 2024 02:17:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 073046B0093; Sun, 19 May 2024 22:17:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F3D166B0096; Sun, 19 May 2024 22:17:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB6FB6B0098; Sun, 19 May 2024 22:17:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id AD8B16B0095 for <linux-mm@kvack.org>; Sun, 19 May 2024 22:17:50 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6C221A19B9 for <linux-mm@kvack.org>; Mon, 20 May 2024 02:17:50 +0000 (UTC) X-FDA: 82137163500.14.CC71D80 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf23.hostedemail.com (Postfix) with ESMTP id 97E93140008 for <linux-mm@kvack.org>; Mon, 20 May 2024 02:17:48 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716171468; 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=7HdxzUrBwQ70eRyGTJgJm/zGz7HkSe+ybfiPyyG6oqmNQqb2ClCRc2sujT7Bqq63KHWda+ NZMyF1tywPvL9ptz/Ao5zZwX4vqptyaurSdPpxNwQHyUJqmyuJ1AFe/rOS8oKS5JagSTRW fSQo1Lcv6yZ+io8xFzHYUaOWVeF0VB0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716171469; a=rsa-sha256; cv=none; b=OVQ/SEZluGXvlOxOhglvry+cZ/8tfyYavc3x8Ipb34RKt2oXjc3KczkiVmdjKYsUcsg0CS FOyLyg1SnAFtbTrAjXGyMQzEI/fhbbsdKCx7APr8kqW/2vHWLhrujRT0ai2QVlu8+JZUpH z8sU5X6q3d8YKYNGB9c8Z1SQZbN7pBA= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none X-AuditID: a67dfc5b-d6dff70000001748-9f-664ab2c844b4 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: [RESEND PATCH v10 02/12] arm64: tlbflush: add APIs manipulating tlb batch's arch data Date: Mon, 20 May 2024 11:17:24 +0900 Message-Id: <20240520021734.21527-3-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240520021734.21527-1-byungchul@sk.com> References: <20240520021734.21527-1-byungchul@sk.com> X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/fWPhaPnbPusnss2FTqsXmFlsfiPS+ZPDat 6mTz2PRpErvHu3Pn2D1OzPjN4jHvZKDH+31X2TwWv/jA5LH1l51H49RrbB6fN8kF8Edx2aSk 5mSWpRbp2yVwZRxo2MdSsJi34mqragPjb64uRg4OCQETibkz6rsYOTnYBNQlbtz4yQxiiwiY SRxs/cMOYjML3GWSONDPBmILC8RJtF77DmazCKhKvHp3EqyeV8BUYsqXV4wgtoSAvMTqDQfA 4pxAc2as2skCYgsB1fw4+pVtAiPXAkaGVYwimXlluYmZOaZ6xdkZlXmZFXrJ+bmbGIFBvKz2 z8QdjF8uux9iFOBgVOLh3XDbM02INbGsuDL3EKMEB7OSCO+mLUAh3pTEyqrUovz4otKc1OJD jNIcLErivF7hqQlCAumJJanZqakFqUUwWSYOTqkGxtrTk2zis81l7UP2SM7PVYqRCBQR7v7g 8vtI0wqJPaUBunM3iH1+ddwi+fgyifLcipiQ/c7dnRbtG2tZGj0NZD82T9v2e5Kfhfn7Hje2 Z049Mwz0Elx4+PVUhWoznsw7It8TJXApR6L+o0+RgV7tjaUT0pr3vYldJvn0QXTZkUvv2ur5 +xKUWIozEg21mIuKEwHkHhI9XgIAAA== X-CFilter-Loop: Reflected X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 97E93140008 X-Rspam-User: X-Stat-Signature: kngfcwqiuygocw4fhqpuasmt4zre9yuz X-HE-Tag: 1716171468-491748 X-HE-Meta: U2FsdGVkX18GV2nE2+0lvMNJLizI080DugC7Y/W4xqAcg7tWiuBzXUyhQdOZv3EXiozfDaripKNszPevMeYBUaiMuQcqhVzRMygUv+Lo447ev/ciBP0OQ6ULRFup23b5b3ren0bfEPlsfLeHCrfrsutgI89ajRF4evnc0tONbc9S+6gz0a0FsI7HTe9L1Yd9Ktv1b1jz8u5OjJSvSbbMG3hHMH1o/2JRlJr9sGqw/UFR3D/prXFsxQ/9Tr6Dqnlbb9ycsQceR7qMQU8xRcQzsYrnVr0xBeLwCFOh1kaiQfaTtxCpafocWSqxpY0AGxmB1fVimE7r827HY5wEL6G0I4KUMDyM8lEpaA4xwxzOVQUBdZyKtvwGM/toOIBDt0UmcbWaTr2c8rG2iJxYV3JmkaUFOVNOs+q2nSjlvg+4Tn4dlksuphHPTPFpDjYYYX1iU0+fqtxlNzsjNIsRqvsics05AzVHrkJjoVcud7ZdhtXd9Gaicwtn9bPhU3YNkxAZvNpFY0U9r90R+Cjq6fGOm+82LSM86f0WOIsBogHThNYm2eOcpMXGlQm6xaTBo9YA6U7wzBHKoznJvzkBqeBWjcqoGkVaIVyqrYQzLyYDW/ffLWcUDy9ihT3SIbuIhUVTwBmH3OV107m0/wEyNnyjXsWFr8vdEpidh6Rm8AEz324/ucq9a5lbzxtAD9p3EpHlDUS+c/wzL4Z5mBM2G+1F70z/65E45AebscA2pJXEaicJ2OsVZGrIWxgiwJbCyVi/iMw3TK3xr/t5i7NNSCYNPuATh+gyKjK1ugnqN+QvT55Zhr/gCPMg1I3l7gzVJDjKQCfBx+CiwRLsnP5Bw6fCGIZsKClHvmnKzVW65etb8U5zJJajICw0ouQ9VXlmrVYEDExlRCzulUFdP8wtEnCx1w+LGFmwySJQ85CHpp83a8pKZvKMhTpQ4SewNQYPG5uqGtyI9T7BJMGdMHo6iZI SLw== 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(+)