From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8272533CEAF; Wed, 17 Dec 2025 15:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765985864; cv=none; b=Fd52VAsCGQH7xtG5HrEt2p3ps9o0OD7s7hTnK0zYHe+fMfjoVTxl4eg47Jylm9m9WEnIlANKdmcL4n7IpTl8p9s1r8ew9JGX+2iMZ6fBfnGPTN+xbyOdXEJoXmf1pcbFQ1Pipn7Vs60zFszxyOsQZrQ5P40rnFd7VkbQWF7UGZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765985864; c=relaxed/simple; bh=uTuyVt7IpFDp1uRYNVGVDI5bVYFkbylLkzBP43Skllw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LnsiCYYpXd7Fu9c2dRjy1nSqRCQHfVclLM0D0DErUI1o9i/dUMiNc6FmS0lTs6CkOXd5rlL0JnOMQ+VrEh5HT5MzeZXG4g0MNTPSMq71vgu+zJ8rF42xGFExdrJ1N7C31by5CxwILqG1Z2N0Pg8Fbv52+Rie13GOce3FgXgS1hk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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