From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4857ECCD1BE for ; Thu, 23 Oct 2025 01:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Brz/1d/5e1prPBNasD9kS+bWyfr9ZaOpRkHybD/Zb1o=; b=OZ29N6YSgFIrVbFIDvEK5zwPLp +7QeOfZhTbN5wx37KJ450RU02vIKN26tT1S/aRrnKR+4p5s5GM2BdG7nNeNfg8rXf5C3RVFnfXv97 LGB2DxtYI4x0vR/GGtKmtcmqGdlldIkCKr2ISMFY1eCNE66yKD5j/FUiQOu85yIQEIVgJJJ5b5VcM 6zqiCPNGRsxdzHpC+UKLE/LyFZB3B3T3EMiI3WVAEu0/Ey0wF28NsRQavOXWVXOIJbc/WwvI2gehX OPd03tm96f9OhO2Za8t97Q6uodKh4qZwcZ2fEvBU2OO7BJZi6I3yDPZnHG1Ti8y0UTXsZqPXQRBSB bgFu9MXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBkFB-00000004liz-3CEu; Thu, 23 Oct 2025 01:35:57 +0000 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBkF8-00000004li1-1nHZ for linux-arm-kernel@lists.infradead.org; Thu, 23 Oct 2025 01:35:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1761183351; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Brz/1d/5e1prPBNasD9kS+bWyfr9ZaOpRkHybD/Zb1o=; b=MTWt++jcz69iJaR/85Kwie21VQWVO2eOSXMXhwTLEqDBIECzCbl2jD1nOeIOJoD7x/AMtwbLDnfK1j5xzkbT511bjyE+LgXh6lfh+PZHm5nooYic/1oQZVR4jUTm872AflLiL3MSfhFPTTHkHIVpr3D3T+J4fvrAI3GQkdgtTwY= Received: from localhost.localdomain(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WqogSeW_1761183336 cluster:ay36) by smtp.aliyun-inc.com; Thu, 23 Oct 2025 09:35:49 +0800 From: Huang Ying To: Catalin Marinas , Will Deacon , Andrew Morton , David Hildenbrand Cc: Huang Ying , Lorenzo Stoakes , Vlastimil Babka , Zi Yan , Baolin Wang , Ryan Roberts , Yang Shi , "Christoph Lameter (Ampere)" , Dev Jain , Barry Song , Anshuman Khandual , Kefeng Wang , Kevin Brodsky , Yin Fengwei , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH -v3 0/2] arm, tlbflush: avoid TLBI broadcast if page reused in write fault Date: Thu, 23 Oct 2025 09:35:22 +0800 Message-Id: <20251023013524.100517-1-ying.huang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251022_183554_636551_E8598EC8 X-CRM114-Status: UNSURE ( 7.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series is to optimize the system performance via avoiding TLBI broadcast if page is reused in the write protect fault handler. More details of the background and the test results can be found in [2/2]. Changelog: v3: - Various code cleanup and improved design and document in [1/2], Thanks Lorenzo and David's comments! - Fixed a typo and improved function interface in [2/2], Thanks Ryan's comments! v2: - Various code cleanup in [1/2], Thanks David's comments! - Remove unnecessary __local_flush_tlb_page_nosync() in [2/2], Thanks Ryan's comments! - Add missing contpte processing, Thanks Rayn and Catalin's comments! Huang Ying (2): mm: add spurious fault fixing support for huge pmd arm64, tlbflush: don't TLBI broadcast if page reused in write fault arch/arm64/include/asm/pgtable.h | 14 ++++--- arch/arm64/include/asm/tlbflush.h | 56 ++++++++++++++++++++++++++++ arch/arm64/mm/contpte.c | 3 +- arch/arm64/mm/fault.c | 2 +- include/linux/huge_mm.h | 2 +- include/linux/pgtable.h | 4 ++ mm/huge_memory.c | 33 ++++++++++------ mm/internal.h | 2 +- mm/memory.c | 62 +++++++++++++++++++++++-------- 9 files changed, 140 insertions(+), 38 deletions(-) Best Regards, Huang, Ying