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 6BC4A2DE6F5; Fri, 24 Oct 2025 12:17:03 +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=1761308224; cv=none; b=FGghBouecGo0IGY5kPBEFakOAtz6NC42cFyCuGnd/QBPauuTKDMd6ijFEx0OU1ctPXv9phOCcl3yZUwfOue6Iow9PY8cQBIgVyf+CyF/Dxm4Hm48GOQWQES4ReSbOdgPdndQ8FCy3NAJZt1C9zciP8N6OLn30zTgebBPekF5nPQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761308224; c=relaxed/simple; bh=cvFdvuPr794gDedSFsrccdsdKFYkvyjvhZA7QrQhBgQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FTq6PbSE8dvi99mFDfRAKMqY7xnrScFs/qlwiOQkE9ZN/1qZrPyNSrDHJtO5cpa/5BV2dsqpgcicpYkdaV9xm29P4ZZLP0IgBWWtOp0YzjJFXJOh14AxcW9svJMyfcRQETC4Yw7NpyrcuOxMQd9ZgST6crrRM04wCsr5bzSRuKo= 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 03DAB1D34; Fri, 24 Oct 2025 05:16:55 -0700 (PDT) Received: from [10.44.160.74] (e126510-lin.lund.arm.com [10.44.160.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 44C443F66E; Fri, 24 Oct 2025 05:16:55 -0700 (PDT) Message-ID: <451403ce-f250-44ac-8e2f-b7b27ee9f588@arm.com> Date: Fri, 24 Oct 2025 14:16:52 +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 09/13] powerpc/mm: replace batch->active with in_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-10-kevin.brodsky@arm.com> <8d5243ec-3edd-49a6-ab51-16643a709d84@redhat.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: <8d5243ec-3edd-49a6-ab51-16643a709d84@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 23/10/2025 22:02, David Hildenbrand wrote: > On 15.10.25 10:27, Kevin Brodsky wrote: >> The generic lazy_mmu layer now tracks whether a task is in lazy MMU >> mode. As a result we no longer need to track whether the per-CPU TLB >> batch struct is active - we know it is if in_lazy_mmu_mode() returns >> true. > > It's worth adding that disabling preemption while enabled makes sure > that we cannot reschedule while in lazy MMU mode, so when the per-CPU > TLB batch structure is active. Yes good point, otherwise this change doesn't make sense. I'll add that. - Kevin