From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (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 52F3048125E for ; Wed, 1 Jul 2026 12:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782908724; cv=none; b=s0VsxxryKZ+g597ujfvcWlVJR46WdGhLKjGu+GWKP4Ws3RtAYMgcIM6g4hAXyHux3fx+0zF/PBsLTmYMmVuc69U8SYuS8G4/JMuhmaZMYUfi4VmoXZ2avvRCs7ndmJe0R/5oLMFa2m4nKF3a+GB/wBF2R0Tivy0zEt0P2fIkODs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782908724; c=relaxed/simple; bh=fdenI9LHMv8Bdc/MX90GPc0ddvp3vXi9zAJyrEyJGQw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=bFfLw8+12C+hmOqXFERmAJbrdDjp7oRgTQxA5se/gj3us5EunlyfD9UZbozR7Tizl6de1oL8q3ZZGzHv3rBxcZzlFlozsjdAytVFbL6JKNl/FgfevY+zQTzSe0MGqEXrtlxyz2Wf0wgOBmSlKXG817+xqpT1gTsi9ASxIcp+eTk= 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=jZwgNYtT; arc=none smtp.client-ip=91.218.175.180 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="jZwgNYtT" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782908719; 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=DsG1kXt+85Rxd+2o95H7CaUPzIdnVqDc9AD2+F5fpAQ=; b=jZwgNYtTmNQJkEYTsA1vxO0R9oKoj2H2a7HwaUiFFh0U/TuLzmZ9IsEmPsxPpfnUcKaPUv 0crm5YQcBVbEVlZ+OTPmEJaAymyhUFNn7oyEofRpQfo+hrQkAGjfIMZZK+d7pWblT5Qo2u MyJOprIuI7U+CZ/zhtBdYm5aJR0BTpw= From: Lance Yang To: david@kernel.org, ziy@nvidia.com Cc: akpm@linux-foundation.org, vbabka@kernel.org, surenb@google.com, mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org, ljs@kernel.org, baolin.wang@linux.alibaba.com, liam@infradead.org, npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com, baohua@kernel.org, lance.yang@linux.dev, rppt@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] mm/page_alloc: remove set_page_private() in prep_compound_tail() Date: Wed, 1 Jul 2026 20:25:06 +0800 Message-Id: <20260701122506.77115-1-lance.yang@linux.dev> In-Reply-To: <53edcc9b-e89a-440b-9d12-7142a561878e@kernel.org> References: <53edcc9b-e89a-440b-9d12-7142a561878e@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On Wed, Jul 01, 2026 at 10:58:21AM +0200, David Hildenbrand (Arm) wrote: >On 6/29/26 04:56, Zi Yan wrote: >> With the subpage->private == 0 check added in a prior commit, any allocated >> compound page should not have nonzero subpage->private. Remove the With Vlastimil's suggestion on patch #03, we still expect tail pages to have 0 ->private when freed, but only check it when check_pages_enabled is enabled :) >> unnecessary subpage->private initialization code in compound page >> preparation. >> >> Signed-off-by: Zi Yan >> --- >> mm/internal.h | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/mm/internal.h b/mm/internal.h >> index 181e79f1d6a2..c96421ce9350 100644 >> --- a/mm/internal.h >> +++ b/mm/internal.h >> @@ -895,7 +895,6 @@ static inline void prep_compound_tail(struct page *tail, >> { >> tail->mapping = TAIL_MAPPING; >> set_compound_head(tail, head, order); >> - set_page_private(tail, 0); > >Do we want another safety check, maybe another VM_WARN_ON_ONCE? Right! I think such a check might still be useful. Same old footgun :P Cheers, Lance