From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 ED704286AC for ; Fri, 3 Jul 2026 14:52:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783090376; cv=none; b=UMX0zs7so9Dfb0nNTeY/K6ia5hCHGtv0F8PHZl16DD383NlaznTJcxr/LK4o5dFGfkzdaBoD8kbPhETSvYLZcCJ7Yb91wkPeuyC/XbumU99bdRHIUVHC2s0+F5CyD/hDXt5ldOfuxA4sZsHam/0wh13TfQ6oyb8RdBvZn1g/R8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783090376; c=relaxed/simple; bh=if/pS2Pzfp6ybG4SlfegWqSXl+hi34mS+4IFZJei+uo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uuiHgXnKl2Ap2eddhHdfU4LXV5jqDpjrb/eizMTPRUaJZ6W54ba5phUPCDnn92La0vx/We2pxrTL9jH1spGcSKQTrzZ8/9yeqhA6VKw1G1E3qXpz6Pi0nuiLHYJWLv7QQxPENX286XVZFqKEtZmjd9w1jBXt3t7yyLyKRqNuXeU= 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=mydS1cG0; arc=none smtp.client-ip=91.218.175.178 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="mydS1cG0" Message-ID: <1f9e4322-1c5e-4409-9a12-ead280bfa4bd@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783090372; 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=78pFcvGqBsTyEx7R+SOnLGnzaGBXiO97ypFlieLOwVk=; b=mydS1cG0VikRlAPagxdsHIFdCh2aej7rbmihV5PMR9Pk5I2mabCesa9j97GUksl0CxTJUi YLw6g7RU+UGOpukqE4gmXAQqPTOHWHg/+HnMaM3rN+i3Z8AY5nchHjk+iAqyLc+sFE3TCQ sEDbRSpgdlHolEzoreltzIkrO2bKZ2A= Date: Fri, 3 Jul 2026 22:52:32 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 5/5] mm/page_alloc: remove set_page_private() in prep_compound_tail() Content-Language: en-US To: Zi Yan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Barry Song , David Hildenbrand , Michal Hocko , Andrew Morton , "Liam R. Howlett" , Dennis Zhou , Christoph Lameter , Mike Rapoport , Johannes Weiner , Lorenzo Stoakes , Ryan Roberts , Alistair Popple , Dev Jain , Brendan Jackman , Vlastimil Babka , Baolin Wang , Tejun Heo , Nico Pache , Suren Baghdasaryan References: <20260703-keep-subpage-private-zero-at-free-v2-0-2970fe777dd6@nvidia.com> <20260703-keep-subpage-private-zero-at-free-v2-5-2970fe777dd6@nvidia.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: <20260703-keep-subpage-private-zero-at-free-v2-5-2970fe777dd6@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2026/7/3 21:47, Zi Yan wrote: > Tail pages are expected to have (and optionally be checked) zeroed > ->private when they are freed. It stays true during subsequent > reallocation, so replace the tail_page->private initialization with a > VM_WARN_ON_ONCE() in compound page preparation. > > Acked-by: Vlastimil Babka (SUSE) > Signed-off-by: Zi Yan > --- LGTM. Feel free to add: Reviewed-by: Lance Yang > mm/internal.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/internal.h b/mm/internal.h > index fa4fb69444ecd..fbd9fb84341bc 100644 > --- a/mm/internal.h > +++ b/mm/internal.h > @@ -902,7 +902,7 @@ static inline void prep_compound_tail(struct page *tail, > { > tail->mapping = TAIL_MAPPING; > set_compound_head(tail, head, order); > - set_page_private(tail, 0); > + VM_WARN_ON_ONCE(tail->private); > } > > static inline void init_compound_tail(struct page *tail, >