Re: [PATCH] for_each_pgdat

William Lee Irwin III (wli@holomorphy.com)
Sat, 20 Jul 2002 13:54:54 -0700


At some point in the past, Robert Love wrote:
>> This patch implements for_each_pgdat(pg_data_t *) which is a helper
>> macro to cleanup code that does a loop of the form:

On Sat, Jul 20, 2002 at 01:43:00PM -0700, Martin J. Bligh wrote:
> If you're going to do that (which I think is a good idea) can you
> rename node_next to pgdat_next, as it often has nothing to do with
> nodes whatsoever (discontigmem on a non-NUMA machine, or even more
> confusingly a NUMA machine which is discontig within a node)? I'll
> attatch a patch below, but it conflicts what what you're doing
> horribly, and it's even easier to do after your abtraction ...

Another option would be to convert pgdats to using list.h, which would
make things even prettier IMHO. After wrapping the list iterations it's
actually not difficult to swizzle the list linkage out from underneath.

And yes, s/pgdat/physcontig_region/ or whatever would make the name
match the intended usage.

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