lkml.org 
[lkml]   [2006]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC 5/8] swap_prefetch: Make use of ZONE_HIGHMEM dependend on CONFIG_HIGHMEM
swap_prefetch: Make use of ZONE_HIGHMEM conditional

swap prefetch uses ZONE_HIGHMEM even if CONFIG_HIGHMEM is off. Make
that use conditional.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.17/mm/swap_prefetch.c
===================================================================
--- linux-2.6.17.orig/mm/swap_prefetch.c 2006-07-03 13:11:06.000000000 -0700
+++ linux-2.6.17/mm/swap_prefetch.c 2006-07-03 13:12:08.000000000 -0700
@@ -277,8 +277,10 @@

ns = &sp_stat.node[z->zone_pgdat->node_id];
idx = zone_idx(z);
- ns->lowfree[idx] = z->pages_high * 3 +
- z->lowmem_reserve[ZONE_HIGHMEM];
+ ns->lowfree[idx] = z->pages_high * 3;
+#ifdef CONFIG_HIGHMEM
+ ns->lowfree[idx] += z->lowmem_reserve[ZONE_HIGHMEM];
+#endif
ns->highfree[idx] = ns->lowfree[idx] + z->pages_high;

if (z->free_pages > ns->highfree[idx]) {
-
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/
\
 
 \ /
  Last update: 2006-07-04 00:00    [from the cache]
©2003-2011 Jasper Spaans