Message ID | 20240226030613.22366-5-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 72AD7C54E41 for <linux-mm@archiver.kernel.org>; Mon, 26 Feb 2024 03:06:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34CB56B014B; Sun, 25 Feb 2024 22:06:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3089D6B014D; Sun, 25 Feb 2024 22:06:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19E8E6B014C; Sun, 25 Feb 2024 22:06:34 -0500 (EST) 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 ED1626B0148 for <linux-mm@kvack.org>; Sun, 25 Feb 2024 22:06:33 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C526E8067C for <linux-mm@kvack.org>; Mon, 26 Feb 2024 03:06:33 +0000 (UTC) X-FDA: 81832467066.24.7B746F8 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf05.hostedemail.com (Postfix) with ESMTP id EC7F710000B for <linux-mm@kvack.org>; Mon, 26 Feb 2024 03:06:31 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=none; spf=pass (imf05.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=1708916792; 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=JD5mtfEWkRjuaUV9XVtob8Xf345yQ1B8wbzU19SAuqU=; b=vzLJ4DZA9KptWHIOojwge3xrpXCZ8W3anTTOE1VGknceXW3H/+r6iC63zSLwKomPSZh5ka S4EODhDyDAOBPE3qjZisefC0bpfdeQqJGrgzEtxgnNFwpu2JG2PpF5Y6kmOBRP2UtUAmGM YnNtWNROh5L0LPDBez5qWX8e4soWR+4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708916792; a=rsa-sha256; cv=none; b=KXTuwm4OkLGJ0v1CBx1QrPqGR1QmhJhh0F4mAl6lyeh4qCikihU/c4VF4uQgk90MG33nff n9SC1BJepBE4E7IHuMsHSyrUgM9hXGAogMvL6IrJEEMzlTZu8u2YE0OvXkCHk7uyyLG+yp rqRD8W6dg+WCd1MFhwB6x608EzQ1T0s= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=none; spf=pass (imf05.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-37-65dc002fa99c 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 v8 4/8] x86/tlb, mm/rmap: Separate arch_tlbbatch_clear() out of arch_tlbbatch_flush() Date: Mon, 26 Feb 2024 12:06:09 +0900 Message-Id: <20240226030613.22366-5-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240226030613.22366-1-byungchul@sk.com> References: <20240226030613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aPnbPusnss2FTqsXmFlsfiPS+ZPDat 6mTz2PRpErvHu3Pn2D1OzPjN4jHvZKDH+31X2TwWv/jA5LH1l51H49RrbB6fN8kF8Edx2aSk 5mSWpRbp2yVwZRy9c4+tYA5nxflfU5kaGC+xdzFyckgImEi8+LcDzGYTUJe4ceMnM4gtImAm cbD1D1icWeAuk8SBfrYuRg4OYYEciX1f00DCLAKqErt/PgUr4RUwlVj78jQLxEh5idUbDjCD lHMCjXn/3xAkLARU8rf3KuMERq4FjAyrGEUy88pyEzNzTPWKszMq8zIr9JLzczcxAoN4We2f iTsYv1x2P8QowMGoxMO74MPtVCHWxLLiytxDjBIczEoivOEyN1OFeFMSK6tSi/Lji0pzUosP MUpzsCiJ83qFpyYICaQnlqRmp6YWpBbBZJk4OKUaGL209/65XXXWKmDGn+p/C/+LPHXn3rCp uvOp7YIZoYk8inLKSj33ZebM2cfpl5Hhf+inK1/xR+v5ZzjOXA/q3Gd443yZlcOa84uuLThy LO6y++o6FgVZgcKfLGJn7dccLRXedev7mYx3Z2bZTU+WL1zryTJlRirjrd9rBWaGRa5+lutY wbx7ursSS3FGoqEWc1FxIgA7DuZGXgIAAA== X-CFilter-Loop: Reflected X-Stat-Signature: a3pi9jdhti7jroexop8bysqgdm4smqey X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: EC7F710000B X-Rspam-User: X-HE-Tag: 1708916791-97485 X-HE-Meta: U2FsdGVkX19Bo+L7YjOXvLvUlCzzrS3H/5yy1qccNZLNFpaGhWHCceipDz/IOmrHOKqc8F3mT5+QlQOQguf3E4+6R6zFvojqO6AmUz9ypaehfuOD7++puuu+J3KBWW5MHk7erd7snpme/8e50UEQVMbh8S58iSLdMJxMGWza3xsx4XPI6ZnJ4Ev6pemrfetw3+t+gWmff+4OsnsOxdUyeOiQWXRHUmIHVJGcSlkaw4DnNo2ucQ2dav1eVKzKJIY4CKJMHBupjuKEWTDvNI1rDS+Ka5bXnMFXeuQmwDe63Cg15M1v8pBiVjLNieZAsk/4HkQZUKvPoYtdFsq37ALEfThICdbB7Bff5X9F7/QkkqSAf1PWz9Pn7h/HxlbPpa4pw0cYdBuLmEjOe5SggemjHncfEkaT3oUPArM8adg5SBsVemwDK7wfs9pPUF4KYCg/kkEYYHMeadNHNOyLM3hqtK+o9yMidHeORIaSQAE5oCiVN5bNx/frpq2sAJQplEXB+1Z/ybjTBG+/wfNGJ43c7o96Pbe2hsnQz+QNmCgVCmnH4jAtEtjx3qnIP30SrIXgwcgxLsmKFivMXjEFeSFyJnZeALQcvhcVnaMuNVu1tMzgbBo9CQJOyMfXQ2E/kJnsYLl6yvLNW6ATslhbaBH0C4L97GDE4V21VwrCAXi6HxZpTcLqDwgrz637/Mu5/GOnl/TuY7pHWS+xAN/RJTIA5qdRK9Mhf18fm1uO9z4lXy1At4wjwCJGfjoZ2XFN2e8iSucbcIkO7mgOMI9KR/jeaPJlddxl+B8I95kh1YtKL9kRpma9rYGe17xoC5DzZJRQmdmkTVRbvXE6TaIXjsd5vQQJiDftk/N1kXImfRXVQD4EBkIQVu2cWhP/ytHGtWGkw4S0bGi0tsxoLrba8FY1OrdZShHP/ByMDNLbZ+K+KiB0CfOz5UGjK8ZtczM0kpxNE81gh3wfeerelATRZsV +vTFkPze 8yjOvl3mAkOjOqD7etiDXDt8kRK3iGAuCSOPj 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 |
Reduce TLB flushes by 94% by improving folio migration
|
expand
|
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 453ea95b667d..941f41df02f3 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -1268,8 +1268,6 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) local_irq_enable(); } - cpumask_clear(&batch->cpumask); - put_flush_tlb_info(); put_cpu(); } diff --git a/mm/rmap.c b/mm/rmap.c index da36f23ff7b0..b484d659d0c1 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -643,6 +643,7 @@ void try_to_unmap_flush(void) return; arch_tlbbatch_flush(&tlb_ubc->arch); + arch_tlbbatch_clear(&tlb_ubc->arch); tlb_ubc->flush_required = false; tlb_ubc->writable = false; }
This is a preparation for migrc mechanism that requires to avoid redundant TLB flushes by manipulating tlb batch's arch data after arch_tlbbatch_flush(). However, we cannot because the data is getting cleared inside arch_tlbbatch_flush(). So separated the part clearing the tlb batch's arch data out of arch_tlbbatch_flush(). Signed-off-by: Byungchul Park <byungchul@sk.com> --- arch/x86/mm/tlb.c | 2 -- mm/rmap.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)