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 47B912E090B; Wed, 17 Dec 2025 09:26:22 +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=1765963586; cv=none; b=gI6lURDwFobMYYfdspmW4smsXApxjl8BhVL34dYfKPJTtUXZ3Wr413J6CYbC/QqSWsyd3fHgMl76UnUfwCTttaDOWiNFb+DWhQ3uW2G5kgUuNsScc7zsaU60LWAwpLRG6s400OddTRGi6YNpO44QFhcPKr5FoCYulyVgu9TVRbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765963586; c=relaxed/simple; bh=3jF/jFK7OxARg3ie9vFOyGVHSEj2QK9rPSqPCEy3H9s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=M3vcG9gTWNmwPceZzEifVAkf/cGWXP2BkPj81Jj3Ekgod1QerYqzyQWUR/mKO4peaiqNwvPbfYfodcyVbkc7yJaCnK7Ql/o6O9li2RRd6oWclb187dv8X4mbUOklIOZmPMD2wmX/oYZK3ipgpKTpsNFu8sZjkcuMferArxs5bVM= 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 B975914BF; Wed, 17 Dec 2025 01:26:14 -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 EA6A93F762; Wed, 17 Dec 2025 01:26:14 -0800 (PST) Message-ID: Date: Wed, 17 Dec 2025 10:26:12 +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: 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)" , Ryan Roberts , 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: <20251216201403.4647a4f9861d3122ee9e90d7@linux-foundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. - Kevin