linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Hu Song <husong@kylinos.cn>, Andrew Morton <akpm@linux-foundation.org>
Cc: Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/page_owner: simplify zone iteration logic in init_early_allocated_pages()
Date: Wed, 1 Oct 2025 15:47:10 +0200	[thread overview]
Message-ID: <e261a18d-0ea3-4fba-9774-aa58270809af@suse.cz> (raw)
In-Reply-To: <20250930092153.843109-2-husong@kylinos.cn>

On 9/30/25 11:21 AM, Hu Song wrote:
> From: Song Hu <husong@kylinos.cn>
> 
> The current implementation uses nested loops: first iterating over all
> online nodes, then over zones within each node. This can be simplified
> by using the for_each_populated_zone() macro which directly iterates
> through all populated zones.
> 
> This change:
> 1. Removes the intermediate init_zones_in_node() function
> 2. Simplifies init_early_allocated_pages() to use direct zone iteration
> 3. Updates init_pages_in_zone() to take only zone parameter and access
>    node_id via zone->zone_pgdat
> 
> The functionality remains identical, but the code is cleaner and more
> maintainable.
> 
> Signed-off-by: Song Hu <husong@kylinos.cn>

LGTM.

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>



  reply	other threads:[~2025-10-01 13:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30  9:21 [PATCH 1/2] mm/page_owner: Rename proc-prefixed variables for clarity Hu Song
2025-09-30  9:21 ` [PATCH 2/2] mm/page_owner: simplify zone iteration logic in init_early_allocated_pages() Hu Song
2025-10-01 13:47   ` Vlastimil Babka [this message]
2025-10-02  2:00   ` Ye Liu
2025-10-01 13:19 ` [PATCH 1/2] mm/page_owner: Rename proc-prefixed variables for clarity Vlastimil Babka
2025-10-02  1:58 ` Ye Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e261a18d-0ea3-4fba-9774-aa58270809af@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=husong@kylinos.cn \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=surenb@google.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox