Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1102596lqb; Wed, 17 Apr 2024 23:17:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVW9ZGqG5Q5IJq5OUSdtofhDLegp44K9hrB5nrP28K8Y/6tIo+hkiXM1GmGhbB+hAHg5yHPkXbloA2NIPJ4ErdzRDD3ldLrf++5SO/y4Q== X-Google-Smtp-Source: AGHT+IEVZeIJV5Dm3VK/BtrCoYu9FCSvV7VlNNJogCk1ODXgBTPUWTdafpdFPDi0kxCoVZlDlaBI X-Received: by 2002:a05:6830:1553:b0:6eb:7d45:5ec3 with SMTP id l19-20020a056830155300b006eb7d455ec3mr2019364otp.31.1713421063121; Wed, 17 Apr 2024 23:17:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713421063; cv=pass; d=google.com; s=arc-20160816; b=wytjwYYd2UZ0wai8M4QgAwQGUy+PY8Uix4Ipv/45SMsKNs1KVRL/SHYEbbE1PTVUn7 vXQXmmwoib11uVvjs79RoLjwjw/AgjhEIjXrLP93nfTdRKlmaJ1coUwLBBFWY9dIVo6s n00aEupDpA+Qnq0jOkHGMQVRtZ+xdNdPoBEwiIwjRa+vpuh99dSojC3UsnFgmFV22xI2 R04a1YBREowrEIQ7NdmlITtBeQThq6GX6nDLJ93OHHFNRviwKEG+Cnw0govnMqTDWafc pLOvrZv3rjAe65fy2u4q865OTA7XlRQ8GPgBLrH1T1D3J6PgVcus+A1uybTFB84t9/2j 1luQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from; bh=h1LxJogwVRhU2XXWivuSuPnKnLEOdSfzrxsdYP060FA=; fh=ZH+M10KtJZRqSjFjp1+uAYTvsWtGX6qxh/YkifVvH1o=; b=hHRMdt9QGBsGFMQreHU2INNacuWeV8yKM788w17Xjdg/OQIHxuZlNfnzG4UOwfBPVq p5zZ4BevnXB8QGKGlMPxLM6PT18XdittfWhVY1yp9nUQYh1MS9GcBD2TDeTgsMU/tA4d yMBDmWslya4bc701W1Xi++VJ1rNtgYyAB55QAjlWAsTOU4q81HMgZfzcGgj5J0wzbMJk roC0wE/Rp85EtqIxJQiyEl9j7xCtjFMdO0Mx8ZXyEglKgY1Sm4bKLDD1J/XzkcsyTUDE 3N5bfMJE76GZvb6aqqg7rNnaAjn7c2TUX9H2KKNoeqbXKigAsSQqG+zUqCx3OgzrKytO T9xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-149561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149561-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c5-20020a630d05000000b005f3e0556e31si787098pgl.863.2024.04.17.23.17.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 23:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-149561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149561-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2CBE7B21B7F for ; Thu, 18 Apr 2024 06:16:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6490F79949; Thu, 18 Apr 2024 06:15:56 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC3136A8A0 for ; Thu, 18 Apr 2024 06:15:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713420955; cv=none; b=S5u/zKiS4q3+swhIKvblwTzpN9FnBKPnai1LXxVuBkOWKlTxulM2itqMIReVAgbVH4jb6TXOf6Gb+S2nmhN+a5GSFlg6qhDiCrmCV/wkj/0YDigQv4W2vg9ZxUZif5b33fDOw9FbaWE64+ydQ1REJ5E6I/ekOMLotmDP2w5jGcE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713420955; c=relaxed/simple; bh=Gvdnrdhu2FdXMBBsWQE2ekKa7OCnN7+KcT/XIeS8gnI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=MgL93xEZek5EIv9rTAbfbVo3Z5ctdlI/ZWEb7J1p+50fTVQtEW3drULMuXDGcLZWEKpEDpk/tlPVcRvrjhY7yXPSpcagrG7DJa2Wa+mJ3mmYTy5UdOXHtGTu4gVvaQaiGNMCNcVkfLJX27rcHoIR3JxSkoUGOud8zVbcqUD/FZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d6dff70000001748-0c-6620ba922584 From: Byungchul Park 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 v9 rebase on mm-unstable 4/8] x86/tlb, mm/rmap: separate arch_tlbbatch_clear() out of arch_tlbbatch_flush() Date: Thu, 18 Apr 2024 15:15:32 +0900 Message-Id: <20240418061536.11645-5-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240418061536.11645-1-byungchul@sk.com> References: <20240418061536.11645-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsXC9ZZnke7kXQppBqf3slnMWb+GzeLzhn9s Fi82tDNafF3/i9ni6ac+FovLu+awWdxb85/V4vyutawWO5buY7K4dGABk8Xx3gNMFvPvfWaz 2LxpKrPF8SlTGS1+/wAqPjlrMouDgMf31j4Wj52z7rJ7LNhU6rF5hZbH4j0vmTw2repk89j0 aRK7x7tz59g9Tsz4zeIx72Sgx/t9V9k8tv6y82iceo3N4/MmuQC+KC6blNSczLLUIn27BK6M KZPWsBQc56ho3TqFsYGxlb2LkZNDQsBEYu27N3D2/7snWUBsNgF1iRs3fjKD2CICZhIHW/+A 1TAL3GWSONDPBmILC1RLfG5cCFbDIqAq8fj/O0YQm1fAVKJnbwMjxEx5idUbDoDVcALN6X9/ CCjOwSEEVHPhbwhEyXs2ieb38RC2pMTBFTdYJjDyLmBkWMUolJlXlpuYmWOil1GZl1mhl5yf u4kRGPbLav9E72D8dCH4EKMAB6MSD+/JA/JpQqyJZcWVuYcYJTiYlUR4W4Rl04R4UxIrq1KL 8uOLSnNSiw8xSnOwKInzGn0rTxESSE8sSc1OTS1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ence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This is a preparation for migrc mechanism that requires to avoid redundant tlb flushes by manipulating tlb batch's arch data. To achieve that, it's needed to separate the part clearing the tlb batch's arch data out of arch_tlbbatch_flush(). Signed-off-by: Byungchul Park --- arch/x86/mm/tlb.c | 2 -- mm/rmap.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 44ac64f3a047..24bce69222cd 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -1265,8 +1265,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 c37ff1648cf1..513e49840da7 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -673,6 +673,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; } -- 2.17.1