Message ID | 20240208062608.44351-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 0615EC48260 for <linux-mm@archiver.kernel.org>; Thu, 8 Feb 2024 06:26:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E2D436B00A0; Thu, 8 Feb 2024 01:26:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CA4416B009B; Thu, 8 Feb 2024 01:26:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0AFB6B00A0; Thu, 8 Feb 2024 01:26:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 820D16B009B for <linux-mm@kvack.org>; Thu, 8 Feb 2024 01:26:28 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5687516070B for <linux-mm@kvack.org>; Thu, 8 Feb 2024 06:26:28 +0000 (UTC) X-FDA: 81767652456.16.DA207E7 Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by imf08.hostedemail.com (Postfix) with ESMTP id 77F1D160002 for <linux-mm@kvack.org>; Thu, 8 Feb 2024 06:26:26 +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=1707373586; 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=UnhajxlhEKXXypR4P7ftewUHT24FZB8C0JRDyHgppEzpnxZQKD5MfKn1v1dq9FbCOU6s58 RYQoahdIEY6lBgblcs+POxchJFTCybtQsrgZEHnNVds7kZNJeN8OdEprCfWdal2VBUd3CD CcQhEh9nDbmlNsy3HdXxwKBUp6Nw6gw= 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=1707373586; a=rsa-sha256; cv=none; b=xzNFpK02FNgDx7yiPQb2KnR5mkD/0cPCGmdUTZHWLZYL37M+VuIErwNPU4ppOO52fZiReu C6wbrlDFdeWMDmO+1Q+euOrMNadFwwytWDQYz+LF6L5g3w/ZHAtW/s+r+25FB2gpFBBjGU elVCCi9m0Liz0lw7vXfDGb0DjNcRIaY= X-AuditID: a67dfc5b-d85ff70000001748-81-65c4740bb40b 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, namit@vmware.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 v7 4/8] x86/tlb, mm/rmap: Separate arch_tlbbatch_clear() out of arch_tlbbatch_flush() Date: Thu, 8 Feb 2024 15:26:04 +0900 Message-Id: <20240208062608.44351-5-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240208062608.44351-1-byungchul@sk.com> References: <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5Pmcpo8fsHUMfJWZNZHIQ8vrf2sXjsnHWX3WPBplKPzSu0PBbv ecnksWlVJ5vHpk+T2D3enTvH7nFixm8Wj3knAz3e77vK5rH4xQcmj62/7Dwap15j8/i8Sc7j 3fy3bAECUVw2Kak5mWWpRfp2CVwZR+/cYyuYw1lx/tdUpgbGS+xdjJwcEgImEr+6/zCC2GwC 6hI3bvxkBrFFBMwkDrb+Aarh4mAW+Mgksfp7BwtIQlggR+Jm+2o2EJtFQFVi5v0vTCA2r4Cp ROviWVBD5SVWbzgANogTaNDObadYQWwhoJoXsyezTWDkWsDIsIpRJDOvLDcxM8dUrzg7ozIv s0IvOT93EyMwvJfV/pm4g/HLZfdDjAIcjEo8vCfKD6cKsSaWFVfmHmKU4GBWEuE123EgVYg3 JbGyKrUoP76oNCe1+BCjNAeLkjivV3hqgpBAemJJanZqakFqEUyWiYNTqoFRTPr95sd1S8w9 LZq/r75bdG7CWt+PyyTdnzM9n83+wamJT/v/NuMazwTNLbtd1wp22HY/fvghbF7crN8mU+9m Oq99Lzvv1Lo97Iea9mW8TUnIKVAN276tXve9odtFlun84o9f/smb82Vl6leeQrenDzqXeW0x r1kxO6y9fY1QpDXPdb0m2zdMSizFGYmGWsxFxYkAJNj2imsCAAA= X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 77F1D160002 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: xsg7pja3eyhd81fawpgoetwkajmes4n3 X-HE-Tag: 1707373586-570056 X-HE-Meta: U2FsdGVkX18K8sKNgg8loyBPPCdRw+czSkeotIJJbzZZt+byqprarsXa5BVkilojlviAAshdrYZrCn5pW9AGcUlSSCkamoUynk6eqAVmbghpux7cJATCDOwdYMmCOuifGp0vvr/jXYTX3GctsnsmYSfpZRJbyn5ml8YLoVR6SJAP4Bl7jcJNmG7ONsTS7sjLbTbG8dka2bsVmJjsFpbAHhLgZrxz+XOD8a8RGWvCKZpuFvbc6rDH6chvrmJXIaJ+ae6XwKzcQFPFPDxy2OEO6QJZAzaZNrF6mSEVoJDcKSIy7e/zZ1fJeeebjbvTY/0B7mxl4El/tGLzvpGG94af9JZHkm818pI/asuh+1nobnPuASD4RdL5zuc8wdGRUml4HY6XeDe3R/pzacJuxPio1ospvkyHXN5AWO86Ttyh63VfB03ykNWHPpdM7i+Qr4Yk4057PtSFGToIgw5LAX64uH6e4xzaADrSZDogR9qSsInGGjUajqsFRw+RE/4VT87Lc3f/L+OGd4OrXBeNNQthuZNDUyLnpyfjsQJqBpQzpfDkZAshlXCtubAyLdYgMeIAylXfppwGqeUVd2clN/ibjmOFlFPZBaaxcjNkJlTbLPMF3cextD2RpbUS4Bqt+f1g8X7MQW/19OGmC1D0qLUjqxwR9IGVZT5O0GbOcBqk3otGjc6A6C1TfZW5+4kr4LbahsSlX9a+xDv9YqlpzNA7oYklbQ8gI2q0xGsf4ewH5nBA3gtnBgHQTPBYwSOXSUnNPm3cgqGmHV9qWrgQ6AapFvAwLJT72FojWJrpc763mZQ0wuzmed5KPiYeG1OKVqEXYb0AHtbZwLF3PzpMf+GV4IoDPmxhF6mez5n4Sopv5Xx+bV+d3+MqQLZyeM2TxS2WOy2xDCg+l4zNa2Zur9/ZSZ6tYmcNTmWqBP0g52QmQgOppoPdBNUOMd7Ptbmw8JaVvNLsJw2f8YWYnDKnHBX i/RQrDr6 6mzPXy+309FQr6rPpZzO2rT0xIi17vxz22vOW 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(-)