From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0DDC4279F4 for ; Wed, 1 Apr 2026 17:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775063669; cv=none; b=qnZPJz2F67dmdaXAK4xNWS1Hyh9Ji1cE6aYy8uFdqao3EoaqjuAuXL3woiOmfy0gQeUoTtp9I45H9HMQp/t/gmiQNxVaBVOFItZLtk3kbLGpMBkJk0siFu2aqNOtwxkIiH4EbCI3EAc81/iQEtZuo0MZcDfefl3pPp2Y8AGgPK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775063669; c=relaxed/simple; bh=EvI/mf/p7ahLxwtiTqriQDhtRh6IYTRjLpLevB/oOQc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cwI2l9att95q2fNDY6FTnNWbf/70SxlYd5UqtjoCU62sN+atRII9AHbhEJ40ATPltkeZLwcDxhKe7jZ6TyQ3dg0Z1dyZZGPBNWHrbHryEQ16+mOlRxEH7HobNnvwhqvODxpYAFdFppUf7haOdrfsnObE8Za0NDL3YVS2t+nO/q0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bZBFII1S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bZBFII1S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA983C4CEF7; Wed, 1 Apr 2026 17:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775063668; bh=EvI/mf/p7ahLxwtiTqriQDhtRh6IYTRjLpLevB/oOQc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bZBFII1SMDyYkP1Kc6KML2r9asPZ9iCWEIY2JvnWYCtKmV6aVDxOpF85ZoFKVTf0E DDy2SlIvLulZ6RVtRtWIfxBzKtFeqWnRHiw3iAv2peVV6GMI3i0qbSfBp5flJKqKF3 J8S82ZSX16VZD4USROgBhxOn4qVp6A3XE0aHCdISrT+jw2Jt9xUeltjdnt7yggEWYe Nfhw/boLIhqTzYgJrr+HhLRqACxQr44ogX3M5z73vKSBs/5faWCkoqZxOn98egwOcp ocnA0cYIO3TmUl1V4wKMtIoe0VGHRCibJlRgYKNmegJjMlLr/Qfgi0EIfm45gmHVc/ bUHKdaaL3VHUg== Message-ID: <885b3c93-32e3-4488-a7a1-891f5ee55515@kernel.org> Date: Wed, 1 Apr 2026 19:14:24 +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] mm/page_alloc: cleanup flag vars in alloc_pages_bulk_noprof() Content-Language: en-US To: Brendan Jackman , Andrew Morton , Suren Baghdasaryan , Michal Hocko , Johannes Weiner , Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20260331-b4-prepare_alloc_pages-flags-v1-1-ea2416def698@google.com> From: "Vlastimil Babka (SUSE)" In-Reply-To: <20260331-b4-prepare_alloc_pages-flags-v1-1-ea2416def698@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/31/26 12:52, Brendan Jackman wrote: > These two variables are redundant, squash them to align > alloc_pages_bulk_noprof() with the style used in > alloc_frozen_pages_nolock_noprof(). > > Signed-off-by: Brendan Jackman Reviewed-by: Vlastimil Babka (SUSE) > --- > mm/page_alloc.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 111b54df8a3cb..5e280ded6e7ac 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5051,7 +5051,6 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid, > struct per_cpu_pages *pcp; > struct list_head *pcp_list; > struct alloc_context ac; > - gfp_t alloc_gfp; > unsigned int alloc_flags = ALLOC_WMARK_LOW; > int nr_populated = 0, nr_account = 0; > > @@ -5092,10 +5091,8 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid, > > /* May set ALLOC_NOFRAGMENT, fragmentation will return 1 page. */ > gfp &= gfp_allowed_mask; > - alloc_gfp = gfp; > - if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &alloc_gfp, &alloc_flags)) > + if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &gfp, &alloc_flags)) > goto out; > - gfp = alloc_gfp; > > /* Find an allowed local zone that meets the low watermark. */ > z = ac.preferred_zoneref; > > --- > base-commit: 57e5b07deacb0a9bd7b8c9b933ff72e902d4f06b > change-id: 20260331-b4-prepare_alloc_pages-flags-5bb9a1e04e00 > > Best regards,