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 2AF762472B5; Fri, 24 Oct 2025 14:54:55 +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=1761317698; cv=none; b=hxtJdFsAkQDQtcc05xGDJuFIwE3BI8ZTdyU+HnyQLX6s5rtgdXF9JVNDAXhO7unjAVgWJwo23Pkp4PYRm4sj++ww/WKE9g2vygWSmX5p1x4RS/6w1bisngbaedz6HnbPsK7Kx5YBIyPvLCkCCAtkiIROLrBkNPyBsangKo7HMNs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761317698; c=relaxed/simple; bh=TLTn/UbQmcHWmadVul4cDw8XkcAbkv+aTx0AlM7M7aQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uOXVUqCJnBNcXHULLrvjyCBddmmr3rWQTQxxTdLcIOJvD2UF5i54mP1If7MXqbh7RF7PyvIrs4K6tjMfGO8cmlsaY4s7vjVbJN6klWGBnuzE0s1sPuNTgDOm1cC3DZQNiFPiLLGdeHNBbYJI39u9qaiFTaxXnWO0z+ILT2gPyoA= 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 8AF2F1424; Fri, 24 Oct 2025 07:54:47 -0700 (PDT) Received: from [10.57.67.38] (unknown [10.57.67.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 10A0E3F63F; Fri, 24 Oct 2025 07:54:47 -0700 (PDT) Message-ID: <1b658758-73dc-4e53-aa7f-696f59067067@arm.com> Date: Fri, 24 Oct 2025 16:54:44 +0200 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 v3 03/13] powerpc/mm: implement arch_flush_lazy_mmu_mode() To: David Hildenbrand , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Alexander Gordeev , Andreas Larsson , Andrew Morton , Boris Ostrovsky , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dave Hansen , "David S. Miller" , "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 , Ryan Roberts , Suren Baghdasaryan , Thomas Gleixner , 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: <20251015082727.2395128-1-kevin.brodsky@arm.com> <20251015082727.2395128-4-kevin.brodsky@arm.com> <60c55686-87dd-46d0-884e-80f7d423663b@redhat.com> <604f26cb-46c6-4533-8110-0b174eed821d@arm.com> <5d5a85ec-0213-4af3-92a9-c02bb13da073@redhat.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: <5d5a85ec-0213-4af3-92a9-c02bb13da073@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 24/10/2025 16:42, David Hildenbrand wrote: > On 24.10.25 14:09, Kevin Brodsky wrote: >> On 23/10/2025 21:36, David Hildenbrand wrote: >>> On 15.10.25 10:27, Kevin Brodsky wrote: >>>> [...] >>>> >>>> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h >>>> b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h >>>> index 146287d9580f..7704dbe8e88d 100644 >>>> --- a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h >>>> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h >>>> @@ -41,6 +41,16 @@ static inline void arch_enter_lazy_mmu_mode(void) >>>>        batch->active = 1; >>>>    } >>>>    +static inline void arch_flush_lazy_mmu_mode(void) >>>> +{ >>>> +    struct ppc64_tlb_batch *batch; >>>> + >>>> +    batch = this_cpu_ptr(&ppc64_tlb_batch); >>> >>> The downside is the double this_cpu_ptr() now on the >>> arch_leave_lazy_mmu_mode() path. >> >> This is only temporary, patch 9 removes it from arch_enter(). I don't >> think having a redundant this_cpu_ptr() for a few commits is really a >> concern? > > Oh, right. Consider mentioning in the patch description > > "Note that follow-up patches will remove the double this_cpu_ptr() on > the arch_leave_lazy_mmu_mode() path again."  Sounds good, will do. - Kevin