From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 61CD13672A7 for ; Thu, 25 Jun 2026 21:55:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782424538; cv=none; b=sLgELWu2DCN3iWxcSIymLE9VNKIqY0aIG2Ev3783QMOhDQD1fR7BUqDk3K4HSDfEd1w/KuhlLtac79uiYRrPPsfWvpUIg9Wedc9jBGWVK4aFvMZ7BfMbB9UES8yP+EGLQoqSQSoo3SabsowIR/wGxPH/wAEczl10uQMpSDCkuko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782424538; c=relaxed/simple; bh=hGPuwIWqwZkN2SWYI+CeLcChDp6cXpQqmoExZtd+kU8=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=X1Qu3MI7DwbHezOnVF+16qLSJvgaPCeCjtil35uFQ5+2WblrhbLoaTGieY/AlMFGWBLydovk8LK/62Th2shW6AHo0974+ag/B5+Y2E8erzl+yJjPSQn4zqaNJAW777WRTKQir6FkhP7lN4ziEjt4Io38FQqzwBEfIMjkAmkqPBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=ekAcyCZX; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="ekAcyCZX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD8F61F000E9; Thu, 25 Jun 2026 21:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1782424537; bh=Rt4f112zSrueMWRT0WzroueLIIukufkKMPXRV2puyzc=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ekAcyCZXr3dZ7UwCVUku4sKOE049YiBK7w6TEcedNJyVde5+DyZaslqxTG+wqI6QG ms/kGfn2/eAMFmCgOJtHVOXG97wSzBNN78JxEdx2lUgv699RrKmq8w19sqzzhGBx4j MV/13Ye2SEy2fl7zdkj0ImvMi8D3TIWeiEymqnJ0= Date: Thu, 25 Jun 2026 14:55:36 -0700 From: Andrew Morton To: Ye Liu Cc: "Vlastimil Babka (SUSE)" , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] mm/page_owner: extract skip_buddy_pages() helper to unify buddy page skipping Message-Id: <20260625145536.53d92da2fc695d1e5df70d02@linux-foundation.org> In-Reply-To: <43a99a8b-3c27-40a1-bcc1-77112eee6c15@linux.dev> References: <20260623065234.31866-1-ye.liu@linux.dev> <20260623065234.31866-2-ye.liu@linux.dev> <20260624172025.3087e8d574285bfa8d6772e3@linux-foundation.org> <43a99a8b-3c27-40a1-bcc1-77112eee6c15@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 On Thu, 25 Jun 2026 15:31:08 +0800 Ye Liu wrote: > > > 在 2026/6/25 15:13, Vlastimil Babka (SUSE) 写道: > > On 6/25/26 02:20, Andrew Morton wrote: > >> On Tue, 23 Jun 2026 14:52:26 +0800 Ye Liu wrote: > >> > >>> Three places in page_owner.c duplicate the same pattern: check if a > >>> page is PageBuddy, read its order via buddy_order_unsafe(), advance > >>> the pfn past the buddy block if the order is valid, and continue. > >>> > >>> Consolidate them into a single inline helper skip_buddy_pages(). > >>> The function returns true (skip) for any buddy page and advances > >>> @pfn past the block when the order is valid; returns false if the > >>> page is not a buddy page and should be processed normally. > >>> > >>> The old init_pages_in_zone() variant used "order > 0" as an extra > >>> guard before advancing pfn, but the continue was unconditional and > >>> (1UL << 0) - 1 == 0, so the behaviour is identical. The comment > >>> about zone->lock is preserved in the helper's kernel-doc. > >> > >> All looks nice, thanks. > > > > I got a bunch of "added to mm-hotfixes-unstable branch" mails, but this > > seems like cleanups and nothing urgent? Was that intended? Yeah, sorry, I soon after moved these into mm-new. > >> A [0/N] cover letter is nice to have. > > > > Seems like it exists, but wasn't delivered. Lore shows its message id, but > > as missing. > > > Apologies, I accidentally sent the cover letter only to my own address. > I'll ensure it goes to the mailing list in future submissions. > Thanks for pointing it out. > > Subject: [PATCH 0/6] mm/page_owner: misc cleanups Please send a full v2 to tidy all this up.