Re: Page allocator: Single Zone optimizations

Andrew Morton
2006-10-17T01:10:20Z

On Mon, 16 Oct 2006 17:50:26 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> The current code in 2.6.19-rc1-mm1 already allows the configuration of a
> system with a single zone. We observed significant performance gains which
> were likely due to the reduced cache footprint (removal of the zone_table
> also contributed).
>
> This patch continues that line of work making the zone protection logic
> optional throwing out moreVM overhead that is not needed in the single
> zone case (which hopefully in the far future most of us will be able to
> use).
>
> Also several macros can become constant if we know that only
> a single zone exists (ZONES_SHIFT == 0) which will remove more code
> from the VM and avoid runtime branching.

akpm:/home/akpm> grep '^+#if' x
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT == 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0
+#if ZONES_SHIFT > 0

Now that just goes too far.