From patchwork Sun Mar 2 14:55:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Roberts X-Patchwork-Id: 13997843 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 DD44CC19F32 for ; Sun, 2 Mar 2025 14:56:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.899721.1307785 (Exim 4.92) (envelope-from ) id 1tokjo-0001eG-Hf; Sun, 02 Mar 2025 14:56:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 899721.1307785; Sun, 02 Mar 2025 14:56:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tokjo-0001df-EP; Sun, 02 Mar 2025 14:56:16 +0000 Received: by outflank-mailman (input) for mailman id 899721; Sun, 02 Mar 2025 14:56:15 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tokjn-0001QO-61 for xen-devel@lists.xenproject.org; Sun, 02 Mar 2025 14:56:15 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 7995bfc7-f776-11ef-9898-31a8f345e629; Sun, 02 Mar 2025 15:56:09 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F1AA2113E; Sun, 2 Mar 2025 06:56:22 -0800 (PST) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 294533F5A1; Sun, 2 Mar 2025 06:56:06 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7995bfc7-f776-11ef-9898-31a8f345e629 From: Ryan Roberts To: Andrew Morton , "David S. Miller" , Andreas Larsson , Juergen Gross , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , "Matthew Wilcox (Oracle)" , Catalin Marinas Cc: Ryan Roberts , linux-mm@kvack.org, sparclinux@vger.kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 0/4] Fix lazy mmu mode Date: Sun, 2 Mar 2025 14:55:50 +0000 Message-ID: <20250302145555.3236789-1-ryan.roberts@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Hi All, I'm planning to implement lazy mmu mode for arm64 to optimize vmalloc. As part of that, I will extend lazy mmu mode to cover kernel mappings in vmalloc table walkers. While lazy mmu mode is already used for kernel mappings in a few places, this will extend it's use significantly. Having reviewed the existing lazy mmu implementations in powerpc, sparc and x86, it looks like there are a bunch of bugs, some of which may be more likely to trigger once I extend the use of lazy mmu. So this series attempts to clarify the requirements and fix all the bugs in advance of that series. See patch #1 commit log for all the details. Note that I have only been able to compile test these changes so appreciate any help in testing. Applies on Friday's mm-unstable (5f089a9aa987), as I assume this would be preferred via that tree. Thanks, Ryan Ryan Roberts (4): mm: Fix lazy mmu docs and usage sparc/mm: Disable preemption in lazy mmu mode sparc/mm: Avoid calling arch_enter/leave_lazy_mmu() in set_ptes Revert "x86/xen: allow nesting of same lazy mode" arch/sparc/include/asm/pgtable_64.h | 2 -- arch/sparc/mm/tlb.c | 5 ++++- arch/x86/include/asm/xen/hypervisor.h | 15 ++------------- arch/x86/xen/enlighten_pv.c | 1 - fs/proc/task_mmu.c | 11 ++++------- include/linux/pgtable.h | 14 ++++++++------ 6 files changed, 18 insertions(+), 30 deletions(-) --- 2.43.0