Re: [PATCH 3/6] Embed zone_id information within the zonelist->zones pointer

From: Mel Gorman
Date: Tue Aug 21 2007 - 04:54:35 EST


On (17/08/07 14:02), Christoph Lameter didst pronounce:
> On Fri, 17 Aug 2007, Mel Gorman wrote:
>
> > +/*
> > + * SMP will align zones to a large boundary so the zone ID will fit in the
> > + * least significant biuts. Otherwise, ZONES_SHIFT must be 2 or less to
> > + * fit
>
> ZONES_SHIFT is always 2 or less....
>

Yeah, I get that but I was trying for future proof at build time. However,
there is no need to have dead code on the off-chance it is eventually
used. Failing the compile should be enough so now the check looks like;

+/*
+ * SMP will align zones to a large boundary so the zone ID will fit in the
+ * least significant biuts. Otherwise, ZONES_SHIFT must be 2 or less to
+ * fit. Error if it's not
+ */
+#if (defined(CONFIG_SMP) && INTERNODE_CACHE_SHIFT < ZONES_SHIFT) || \
+ ZONES_SHIFT > 2
+#error There is not enough space to embed zone IDs in the zonelist
+#endif
+

> Acked-by: Christoph Lameter <clameter@xxxxxxx>
>

Thanks

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
-
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/