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 309412D9EEF; Thu, 6 Nov 2025 10:30:01 +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=1762425002; cv=none; b=kcn1yuVETJ428mA2kGEGKuO1NAVfHgxYoUomr+CyxEInPzMat4txuUsrFSud4n16o+QwrAd71st9+E/Z2Dt3egQ/txvbGbJWP3QDXBvLSPDaWP4WTKAhm0WgASQWAGhYMxWTFXJjXCX5lVR3HS28DX/iQFo4/pndv4kEWyYTpM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762425002; c=relaxed/simple; bh=P+p0lHMmcq6V8XYWa+TFNI2hi5Mi5ePNUn2/hRqUmeM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ObuatkyRTXYZELcc/zob1dlzx8BrRftJoOXl9xNi9Os7p/AVQe/36w8sK/ld1y5bqQqCgxCB0YkVgWz2EU2U5FVxC/8EhV1IF63CjKtqZu+Aly1q3l1BCdjJMPhwLHP1QiqcYb06tCT7yW8cslDP7bt3fhf0qa3Rwg/GNiGqB+A= 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 B85731596; Thu, 6 Nov 2025 02:29:52 -0800 (PST) Received: from [10.1.34.75] (unknown [10.1.34.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB9A53F66E; Thu, 6 Nov 2025 02:29:53 -0800 (PST) Message-ID: Date: Thu, 6 Nov 2025 10:29:50 +0000 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 v4 01/12] powerpc/64s: Do not re-activate batched TLB flush To: "Ritesh Harjani (IBM)" , 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 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 , 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, Venkat Rao Bagalkote References: <20251029100909.3381140-1-kevin.brodsky@arm.com> <20251029100909.3381140-2-kevin.brodsky@arm.com> <87qzud42n1.ritesh.list@gmail.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: <87qzud42n1.ritesh.list@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 05/11/2025 02:46, Ritesh Harjani (IBM) wrote: > Kevin Brodsky writes: > >> From: Alexander Gordeev >> >> Since commit b9ef323ea168 ("powerpc/64s: Disable preemption in hash >> lazy mmu mode") a task can not be preempted while in lazy MMU mode. >> Therefore, the batch re-activation code is never called, so remove it. >> >> Signed-off-by: Alexander Gordeev >> Signed-off-by: Kevin Brodsky >> --- >> arch/powerpc/include/asm/thread_info.h | 2 -- >> arch/powerpc/kernel/process.c | 25 ------------------------- >> 2 files changed, 27 deletions(-) >> > Since the commit referenced in above disables the preemption in > arch_enter_lazy_mmu(), so the expectation is that we will never be > context switched while in lazy_mmu, hence the code changes in > switch_to() around __flush_tlb_pending() should ideally never be called. Correct, that's the idea. > With this analysis - the patch looks good to me. I will give this entire > patch series a try on Power HW with Hash mmu too (which uses lazy mmu and > let you know the results of that)! That'd be very appreciated, thanks a lot! > For this patch please feel free to add: > Reviewed-by: Ritesh Harjani (IBM) > > > CC: Venkat who also runs CI on linux Power HW for upstream testing :) Ack, will Cc you both in the next version. - Kevin