Re: [PATCH] Add nid sanity on alloc_pages_node

From: Andrew Morton
Date: Fri Jul 13 2007 - 03:03:20 EST


On Thu, 12 Jul 2007 23:49:38 -0700 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> first_node(node_online_map);

Incidentally, we have a helper for this operation:

#if MAX_NUMNODES > 1
...
#define first_online_node first_node(node_online_map)
...
#else
...
#define first_online_node 0
...
#endif

So I suppose we should use that - it should generate better code for
non-NUMA builds.

It's a pretty sadly implemented helper though. It should be
"first_online_node()", not "first_online_node".


I'm scratching my head over that min_t in __first_node(), too. I don't think
it's possible for find_first_bit(..., N) to return anything >N _anyway_. And if
it does, we want to know about it.

<looks at Paul>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/