Re: [PATCH 01/60] nodemask: add node-state iterators

From: Yury Norov

Date: Tue Nov 24 2026 - 16:00:36 EST


On Mon, Nov 23, 2026 at 09:01:22AM -0500, Gregory Price (Meta) wrote:
> On 2026-11-22 10:32 -0500, Yury Norov wrote:
> > On Fri, Nov 20, 2026 at 01:08:52PM -0500, Gregory Price via B4 Relay wrote:
> > > From: "Gregory Price (Meta)" <gourry@xxxxxxxxxx>

...

> for_each_node_mask_and() would be more consistent, change just requires
> passing node_state[N_MEMORY_X] instead of just the node state bit.
>
> > > + for_each_and_bit(node, nodes_addr(mask), \
> > > + nodes_addr(node_states[state]), MAX_NUMNODES)
> > > +
> >
> > Please use nr_node_ids instead of MAX_NUMNODES.
> >
>
> I followed for_each_node_mask() which uses MAX_NUMANODES but let me
> look.

This is my glitch - I have a series switching the codebase to the
runtime nr_node_ids, but didn't merge it yet. So please continue using
MAX_NUMNODES. I'll add you in CC for that series, so you'll be aware.