Re: [PATCH] for_each_zone / for_each_pgdat

Pavel Machek
2002-04-18T10:03:17Z

Hi!

> replace slightly obscure while loops with for_each_zone and
> for_each_pgdat macros, this version has the added optimisation
> of skipping empty zones (thanks to William Lee Irwin)

@@ -501,7 +497,7 @@
pg_data_t *pgdat = pgdat_list;
unsigned int sum = 0;

- do {
+ for_each_pgdat(pgdat) {
zonelist_t *zonelist = pgdat->node_zonelists +
(GFP_USER & GFP_ZONEMASK);
zone_t **zonep = zonelist->zones;
zone_t *zone;

You can kill pgdat initialization here.
Pavel
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa