From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97E5D2DCBF8 for ; Fri, 14 Nov 2025 08:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763110466; cv=none; b=so4l3FsRYaBfNJ0owpYhyfnD7k4ziD6VB9W/IoGx7s72S1/4cpv9QGAivHh8j3VTpm//d5wQ5xJgSJCpWMJXPmSz1QnTLMqaTlerNrUMTlqZhwIaL7Q5sKXPzT4xvN3iAXE+8z44WURltWNH8fjKauO6HuWi2plr+ozV1yjd5ss= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763110466; c=relaxed/simple; bh=3+Lbtnw2UiNuMDlnFvy9v4eooUQn6wQWEK0fHfnyWZ8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ZKxRYH29A1gf7WOt3eNKQT+fWBNYTwbFVF8155OPwQ9KIPbkUIAlDp/AxVbootZKNoM6lkKSSezwU//J+GWgI1PI3gYsCE30YUb5yy1BQyxLOeGZ8il8dmXcSNylUjN/y5V8otCJ2xyjbRaIoYehlawRxcdmX3CboAikiVKSods= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=AjFSYPyR; arc=none smtp.client-ip=115.124.30.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="AjFSYPyR" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1763110461; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=XyGOdB7idn1b8/brWtbuVsRu7Ehn6oDN9fwlNDOi6og=; b=AjFSYPyR8snc88TfxJPgaJFJtoJ/gxUNK73/MeZBUVPG96WiVAR/GhHpQVubBnWo/vDZSp+22pJqAF3ifAYe+4EB3imPvMDgKm6fY5ldR2gqEJczVydzACqMiQX8APG9ArQtlD0dY/Yf4vSbfk+sekb1Jc5KIg8me82wBK+9PmU= Received: from localhost.localdomain(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WsMaAYg_1763110455 cluster:ay36) by smtp.aliyun-inc.com; Fri, 14 Nov 2025 16:54:20 +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 -v6 0/2] arm, tlbflush: avoid TLBI broadcast if page reused in write fault Date: Fri, 14 Nov 2025 16:54:01 +0800 Message-Id: <20251114085403.101552-1-ying.huang@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: v6: - Collect Acked-by, Thanks Zi! v5: - Code cleanup for [2/2], Thanks David's comments! - Rebased on v6.18-rc5. v4: - Collected Reviewed-by and Acked-by, Thanks Lorenzo, David, Ryan, and Barry. 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 | 8 +++- 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, 145 insertions(+), 39 deletions(-) Best Regards, Huang, Ying