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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 9E25AD65C6C for ; Wed, 17 Dec 2025 15:38:29 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4dWdHD4wWrz2yvV; Thu, 18 Dec 2025 02:38:16 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1765985896; cv=none; b=GLqNVfl7N9OpOxKIcKLRVbupJ8k0jG2IQeIgzyrk5Cn62rhmp/OtvCPjbPzgt8K7OZtZSXp85EWUSzT1NfOtsAApbEBy8YxeoCXRC27fJArSiEpW/UJBeZB/oy/C4m4ylNkPTkOfs0mKlGPVqoChv+hXcBHBE7/x8vj90keAlQR5mjMmS9g6EnAS8BsQJRpFGn0X9xC7aWO6yT3eTt5q52fLWNFt1/YJQlb7MlLZ4fftzc6852ucJ2dsT9+8XS1Fj/0iPku+uT3NI9z87pzpHE1Jmr6e5VeZRnB+HnfANbzZglxkAJ+LoEUUHQJ84H7jb6jwHLZb/x98kafQYkCDJQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1765985896; c=relaxed/relaxed; bh=FNXnygxVGZlNSda/Xzng+nXL6FF3ilHKktsZ5KooddY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MgdH6OePxZL+Z1InNdrjyzJLyaANUlzEU+SJwamUTncZD3GLt9iGBeI3VuAK1SHC6hmDgfq9HViTqLGRz3Tc4ZczDpLKmXc08FC4xjlGsgfMqby8LU5uP55Y3dy0nddVxxqtpcwt7dGebOC3XSpjavdypXyTme8S6ysfhYeXLtdapz7bQaCeH8mJRNWK5jACAkh9fcNXm04eWZJab3dYm/b0xLqv5/F4kn+3twrwI2ZfaTIMsuOsRV+GnlUXAjpdqg31R0s3Wrfr9gOuwdjuJM0V5TGmvypjd3I+BrwE4smeVbWGJP/5+emoEK6mDxI9u38jfBjTqWSPMFDcXYqqDQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=kevin.brodsky@arm.com; receiver=lists.ozlabs.org) smtp.mailfrom=arm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=kevin.brodsky@arm.com; receiver=lists.ozlabs.org) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4dWdHC41Bkz2yvK for ; Thu, 18 Dec 2025 02:38:13 +1100 (AEDT) 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 7EBF6FEC; Wed, 17 Dec 2025 07:37:34 -0800 (PST) Received: from [10.57.47.3] (unknown [10.57.47.3]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 487443F73F; Wed, 17 Dec 2025 07:37:35 -0800 (PST) Message-ID: <6afcb722-80cc-4bb2-a745-d9ad7893f0ae@arm.com> Date: Wed, 17 Dec 2025 16:37:32 +0100 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 14/14] mm: Add basic tests for lazy_mmu To: Ryan Roberts , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Alexander Gordeev , Andreas Larsson , Anshuman Khandual , Boris Ostrovsky , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dave Hansen , David Hildenbrand , "David S. Miller" , David Woodhouse , "H. Peter Anvin" , Ingo Molnar , Jann Horn , Juergen Gross , "Liam R. Howlett" , Lorenzo Stoakes , Madhavan Srinivasan , Michael Ellerman , Michal Hocko , Mike Rapoport , Nicholas Piggin , Peter Zijlstra , "Ritesh Harjani (IBM)" , Suren Baghdasaryan , Thomas Gleixner , Venkat Rao Bagalkote , Vlastimil Babka , Will Deacon , Yeoreum Yun , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org References: <20251215150323.2218608-1-kevin.brodsky@arm.com> <20251215150323.2218608-15-kevin.brodsky@arm.com> <20251216201403.4647a4f9861d3122ee9e90d7@linux-foundation.org> From: Kevin Brodsky Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 17/12/2025 11:01, Ryan Roberts wrote: > On 17/12/2025 09:26, Kevin Brodsky wrote: >> On 17/12/2025 05:14, Andrew Morton wrote: >>> On Mon, 15 Dec 2025 15:03:23 +0000 Kevin Brodsky wrote: >>> >>>> Add basic KUnit tests for the generic aspects of the lazy MMU mode: >>>> ensure that it appears active when it should, depending on how >>>> enable/disable and pause/resume pairs are nested. >>> I needed this for powerpc allmodconfig; >>> >>> --- a/arch/powerpc/mm/book3s64/hash_tlb.c~mm-add-basic-tests-for-lazy_mmu-fix >>> +++ a/arch/powerpc/mm/book3s64/hash_tlb.c >>> @@ -30,6 +30,7 @@ >>> #include >>> >>> DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); >>> +EXPORT_SYMBOL_GPL(ppc64_tlb_batch); >>> >>> /* >>> * A linux PTE was changed and the corresponding hash table entry >>> @@ -154,6 +155,7 @@ void __flush_tlb_pending(struct ppc64_tl >>> flush_hash_range(i, local); >>> batch->index = 0; >>> } >>> +EXPORT_SYMBOL_GPL(__flush_tlb_pending); >>> >>> void hash__tlb_flush(struct mmu_gather *tlb) >>> { >>> _ >> Oh indeed I hadn't considered that arch_{enter,leave}_lazy_mmu_mode() >> refer to those symbols on powerpc... Maybe a bit overkill to export >> those just for a test module, but I'm not sure there's a good >> alternative. Forcing LAZY_MMU_MODE_KUNIT_TEST=y is ugly as it would also >> force KUNIT=y. Alternatively we could depend on !PPC, not pretty either. > Does EXPORT_SYMBOL_IF_KUNIT() help? It most certainly would, I didn't know about that one, thanks! - Kevin