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 A400B3D3002 for ; Tue, 23 Jun 2026 11:02:58 +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=1782212580; cv=none; b=BciCYOrWjE2yn0R5ZCoo3phYJN6vEb76RsxYelROywZOaQ5phQCtSoMNWRDwVo3QILV3huaGuyntcPRL1KBpFXRghzb0ufczDg7mm8YCaTcgRe8/r4Api0IgRsXgR9fTAYL8VdNwca5urA8BghWjEm8BMlkL2yAqg1qM8xDXF4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782212580; c=relaxed/simple; bh=gGjnqReNbED3UDwNUKA/bNOxEnxJjqfSBvAvUFwdl1g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MewWPDUI8SzoqLTpwylaOn5Lo3zfaO1Gidt6+r92P5Fkqvs4lWLdTsCeLAWLuD3EmGSzKx9sPJSYL7MshbQc0VsRcWgoxHWsct1x0pDg7C5SZALC+W9lOyvxLyWfhbggsC8DG1pWw34IMhoATKoSwjK8ksxmUvjGZyGaf/AMN5Q= 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; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=dlyVYc7G; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="dlyVYc7G" 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 54CFE1A25; Tue, 23 Jun 2026 04:02:53 -0700 (PDT) Received: from [10.164.148.38] (unknown [10.164.148.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A95C3F632; Tue, 23 Jun 2026 04:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1782212577; bh=gGjnqReNbED3UDwNUKA/bNOxEnxJjqfSBvAvUFwdl1g=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dlyVYc7GDR+VoWyQTKZhpk7itUHypD9D3TGNIaLEKmykY+7rMKI7tS9NhvJwa6h4i lmUmPU0COJwk3mx6g597g0JvK1FqqwexCOoPMz6Ourm837ktIHoFYuLjwm7ZQDMnpY wp6wHbkIWdtdKMWIYFqaPo5LsngC8VmPqfcq94s0= Message-ID: <6847a972-65d9-47ff-b971-c79544d53957@arm.com> Date: Tue, 23 Jun 2026 16:32:46 +0530 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 11/12] mm/mprotect: drop 'sub' from page_anon_exclusive_sub_batch To: "David Hildenbrand (Arm)" , akpm@linux-foundation.org, ljs@kernel.org, chrisl@kernel.org, kasong@tencent.com, hughd@google.com, liam@infradead.org Cc: riel@surriel.com, vbabka@kernel.org, harry@kernel.org, jannh@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, qi.zheng@linux.dev, shakeel.butt@linux.dev, baohua@kernel.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, shikemeng@huaweicloud.com, nphamcs@gmail.com, bhe@redhat.com, youngjun.park@lge.com, baolin.wang@linux.alibaba.com, pfalcato@suse.de, ryan.roberts@arm.com, anshuman.khandual@arm.com References: <20260526063635.61721-1-dev.jain@arm.com> <20260526063635.61721-12-dev.jain@arm.com> Content-Language: en-US From: Dev Jain In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 16/06/26 7:42 pm, David Hildenbrand (Arm) wrote: > On 5/26/26 08:36, Dev Jain wrote: >> Shorten the function name by dropping the "sub-batch" context - the >> function itself doesn't need this context. > > What about "sub_batch_idx" ? I'll change that. > > This function is rather independent of the rest, so best to send that as a > cleanup separately. Okay. > >> >> Signed-off-by: Dev Jain >> --- >> mm/mprotect.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/mm/mprotect.c b/mm/mprotect.c >> index 9cbf932b028cf..3357058672016 100644 >> --- a/mm/mprotect.c >> +++ b/mm/mprotect.c >> @@ -143,7 +143,7 @@ static __always_inline void prot_commit_flush_ptes(struct vm_area_struct *vma, >> * !PageAnonExclusive() pages, starting from start_idx. Caller must enforce >> * that the ptes point to consecutive pages of the same anon large folio. >> */ >> -static __always_inline int page_anon_exclusive_sub_batch(int start_idx, int max_len, >> +static __always_inline int page_anon_exclusive_batch(int start_idx, int max_len, >> struct page *first_page, bool expected_anon_exclusive) >> { >> int idx; >> @@ -179,7 +179,7 @@ static __always_inline void commit_anon_folio_batch(struct vm_area_struct *vma, >> >> while (nr_ptes) { >> expected_anon_exclusive = PageAnonExclusive(first_page + sub_batch_idx); >> - len = page_anon_exclusive_sub_batch(sub_batch_idx, nr_ptes, >> + len = page_anon_exclusive_batch(sub_batch_idx, nr_ptes, >> first_page, expected_anon_exclusive); >> prot_commit_flush_ptes(vma, addr, ptep, oldpte, ptent, len, >> sub_batch_idx, expected_anon_exclusive, tlb); > >