From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) (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 EE664408633 for ; Tue, 30 Jun 2026 12:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782820924; cv=none; b=S1GiD9yVdOZNCrBdVysxRVFFUCnKjXZbH/NfzawkC0vfnUmpXF0DIahKy7oI9dcX5IZ0fw71V9bIrK22VL3kHPJyhjiFt0PVLy86XTnbeB69/RRR6htyNZ3n4aGsAHdr0FJOZfeSL3CHncYsMh9e/JMbyfi3kLy5yH5eae6ejDw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782820924; c=relaxed/simple; bh=rUAjUgPvFvnLSQu3UYtZbdv2V8E+HjHs5amdXDXXa6k=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=U4oHbySlC3mXbb4sVr0qn3ZLkeCxLdJp2l3evpqpLr5Z3zZ9GyeMwHxBPPloSFTs+RQy1QoR4I56b+I7GXaOOshKpeq3nhVosAEx4jsHuTBKdwLWkazOJFTohirE2WRN+UZ9UqK050tn6H1qIzXQQc5e/uR+fgOpU2CORSSAbPU= 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=d/HMIBfc; arc=none smtp.client-ip=91.218.175.181 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="d/HMIBfc" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782820910; 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=5nPODt4gTf0vvhWgCFfGUzQ9veN5BNMQcI7/OEbq+Vo=; b=d/HMIBfckQ/xUy/p4Ui9WnefAf9EcK14IoRJ8lJkSyf6CftDv4WIt1LK+uKzpR/oz1uBao kSpCOLzYNW3L4+AwuJoC/Ekt3JmfEldNFDXWB5bsGBHsnQW3AvQmlMyPpK21b0BwlosqNM IkeTyZvmHHehLNn/frvAmWaWqlZzOfM= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 30 Jun 2026 12:01:37 +0000 Message-Id: To: "Hao Ge" , "Brendan Jackman" Cc: "Harry Yoo (Oracle)" , "Gregory Price" , "Alexei Starovoitov" , "Matthew Wilcox" , , , , "Vlastimil Babka" , "Andrew Morton" , "Suren Baghdasaryan" , "Michal Hocko" , "Johannes Weiner" , "Zi Yan" , "Muchun Song" , "David Hildenbrand" , "Oscar Salvador" , "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" Subject: Re: [PATCH v3 15/16] mm: replace __GFP_NO_CODETAG with ALLOC_NO_CODETAG X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Brendan Jackman" References: <20260629-alloc-trylock-v3-0-57bef0eadbc2@google.com> <20260629-alloc-trylock-v3-15-57bef0eadbc2@google.com> In-Reply-To: X-Migadu-Flow: FLOW_OUT On Tue Jun 30, 2026 at 1:55 AM UTC, Hao Ge wrote: >> +/* >> + * Skip early PFN recording for a page allocation. Used by >> + * __alloc_tag_add_early_pfn() to avoid recursion when allocating pages= for the >> + * early PFN tracking list itself. >> + * >> + * Codetags of the pages allocated with __GFP_NO_CODETAG should be >> + * cleared (via clear_page_tag_ref()) before freeing the pages to preve= nt >> + * alloc_tag_sub_check() from triggering a warning. >> + */ > > > I originally wrote this lengthy comment because the logic lives inside=20 > alloc_tag.c. > > I wanted to document all the context to avoid confusion when revisiting= =20 > this code later on. > > We've since replaced __GFP_NO_CODETAG with ALLOC_NO_CODETAG, a generic=20 > alloc_flags bit defined in page_alloc.h. > > The original long comment is no longer accurate: > > Given that, I suggest updating it to the following: > > /* > > =C2=A0* Avoid alloc_tag recursion for internal allocations. > > =C2=A0* Callers must clear_page_tag_ref() before > =C2=A0* freeing to avoid warnings from alloc_tag_sub_check(). > > =C2=A0*/ Thanks for the context, pasting this in for v4!