From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 E9317377559 for ; Wed, 1 Jul 2026 16:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782924150; cv=none; b=meSmKqM0ksY74XwfzJWPR/HA2+veVF3djWBRHcRRg8UXe7MzzLyIaftLgJIw6E/D7r8z3hai4bJV9jAWW5nlIXuxuBIci6PgvvDuDCNU3TqtEJ3vsDdxDowi1Pg4tXG4ttHVOQlLp7l/SXHDMx8NMNgQJjfmtfRzJvIQZPuhU8M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782924150; c=relaxed/simple; bh=D6Jp4rawiXmUerxKc/vs/HIx+Nz7ULvB8flOmBQMtfo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CPMtjrpnh0a6bwf9NVJy31QjlhUHHROvxuXnXlKlIdbRA74JlV5KcX+YdnbCcxfC6ku4A0MH6fgNB/bhNE/OviF0/F94bolXsgw+IjicX6tnYYoFOczp0QRiaBHfOiWE41Dt93Y2Dn9QsG8s8UrgTsC8yDWJ/vv3+VPioz48MCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Gob2BKBl; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Gob2BKBl" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782924136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x+2gpszS6w1yPKfdIUMLb1Oz1PqSPFzVoqNJzo8qoik=; b=Gob2BKBl4xI1NuEjSX/JqK/ZTWRbrSC78wZVvwDeHm7rMYcEjgQX654mowJYjIDp4/2X7Y fFCksd0v4vcM9WNyEkD1WOxXaV37inPDU5Spax8knAo8OFESpem8NpvkG+c05nK1fd2ES+ DJrmMEPCzsrhiRYGoE8G3U151/Sw1/I= Date: Wed, 1 Jul 2026 09:41:08 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v3 02/16] mm/page_alloc: some renames to clarify alloc_flags scopes To: Brendan Jackman , Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Johannes Weiner , Zi Yan , Muchun Song , Oscar Salvador , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Ying Huang , Alistair Popple , Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt Cc: "Harry Yoo (Oracle)" , Gregory Price , Alexei Starovoitov , Matthew Wilcox , Hao Ge , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev References: <20260629-alloc-trylock-v3-0-57bef0eadbc2@google.com> <20260629-alloc-trylock-v3-2-57bef0eadbc2@google.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: JP Kobryn In-Reply-To: <20260629-alloc-trylock-v3-2-57bef0eadbc2@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 6/29/26 6:11 AM, Brendan Jackman wrote: > It's pretty confusing that: > > - The slowpath and fastpath have a totally distinct set of alloc_flags. > > - gfp_to_alloc_flags() sounds generic but it only influences the > slowpath. > > Rename some variables to highlight which alloc_flags are > fastpath-specific. Rename gfp_to_alloc_flags() to highlight that it's > slowpath-specific. > > gfp_to_alloc_flags_cma() and gfp_to_alloc_flags_nonblocking() currently > have perfectly harmless names, but to keep the naming consistent also > rename those to the alloc_flags_*() pattern (which already exists for > alloc_flags_nofragment()). > > Signed-off-by: Brendan Jackman > --- > mm/page_alloc.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 421271849f291..6010693861ec2 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3774,8 +3774,8 @@ alloc_flags_nofragment(struct zone *zone, gfp_t gfp_mask) > } > > /* Must be called after current_gfp_context() which can change gfp_mask */ > -static inline unsigned int gfp_to_alloc_flags_cma(gfp_t gfp_mask, > - unsigned int alloc_flags) > +static inline unsigned int alloc_flags_cma(gfp_t gfp_mask, > + unsigned int alloc_flags) > { > #ifdef CONFIG_CMA > if (gfp_migratetype(gfp_mask) == MIGRATE_MOVABLE) > @@ -4474,7 +4474,7 @@ static void wake_all_kswapds(unsigned int order, gfp_t gfp_mask, > } > > static inline unsigned int > -gfp_to_alloc_flags_nonblocking(gfp_t gfp_mask, unsigned int order) > +alloc_flags_nonblocking(gfp_t gfp_mask, unsigned int order) > { > unsigned int alloc_flags = 0; [...] Acked-by: JP Kobryn