]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] reduce MAX_NR_ZONES: make display of highmem counters conditional on CONFIG_H...
authorChristoph Lameter <clameter@sgi.com>
Tue, 26 Sep 2006 06:31:10 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:46 +0000 (08:48 -0700)
Do not display HIGHMEM memory sizes if CONFIG_HIGHMEM is not set.

Make HIGHMEM dependent texts and make display of highmem counters optional

Some texts are depending on CONFIG_HIGHMEM.

Remove those strings and remove the display of highmem counter values if
CONFIG_HIGHMEM is not set.

[akpm@osdl.org: remove some ifdefs]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/base/node.c
fs/proc/proc_misc.c
mm/page_alloc.c

index e9b0957f15d12ef522cee3145ba81bd6bf737273..e09f5c2c11eefb1f24358649035d1d0128d5158b 100644 (file)
@@ -54,10 +54,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       "Node %d MemUsed:      %8lu kB\n"
                       "Node %d Active:       %8lu kB\n"
                       "Node %d Inactive:     %8lu kB\n"
+#ifdef CONFIG_HIGHMEM
                       "Node %d HighTotal:    %8lu kB\n"
                       "Node %d HighFree:     %8lu kB\n"
                       "Node %d LowTotal:     %8lu kB\n"
                       "Node %d LowFree:      %8lu kB\n"
+#endif
                       "Node %d Dirty:        %8lu kB\n"
                       "Node %d Writeback:    %8lu kB\n"
                       "Node %d FilePages:    %8lu kB\n"
@@ -72,10 +74,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
                       nid, K(i.totalram - i.freeram),
                       nid, K(active),
                       nid, K(inactive),
+#ifdef CONFIG_HIGHMEM
                       nid, K(i.totalhigh),
                       nid, K(i.freehigh),
                       nid, K(i.totalram - i.totalhigh),
                       nid, K(i.freeram - i.freehigh),
+#endif
                       nid, K(node_page_state(nid, NR_FILE_DIRTY)),
                       nid, K(node_page_state(nid, NR_WRITEBACK)),
                       nid, K(node_page_state(nid, NR_FILE_PAGES)),
index 94215622544744f8b13084904b83cd10afbcfe87..caa0a51560a03fe6d8599445543d5d3d72a70811 100644 (file)
@@ -157,10 +157,12 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
                "SwapCached:   %8lu kB\n"
                "Active:       %8lu kB\n"
                "Inactive:     %8lu kB\n"
+#ifdef CONFIG_HIGHMEM
                "HighTotal:    %8lu kB\n"
                "HighFree:     %8lu kB\n"
                "LowTotal:     %8lu kB\n"
                "LowFree:      %8lu kB\n"
+#endif
                "SwapTotal:    %8lu kB\n"
                "SwapFree:     %8lu kB\n"
                "Dirty:        %8lu kB\n"
@@ -183,10 +185,12 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
                K(total_swapcache_pages),
                K(active),
                K(inactive),
+#ifdef CONFIG_HIGHMEM
                K(i.totalhigh),
                K(i.freehigh),
                K(i.totalram-i.totalhigh),
                K(i.freeram-i.freehigh),
+#endif
                K(i.totalswap),
                K(i.freeswap),
                K(global_page_state(NR_FILE_DIRTY)),
index 4b33878e94883d865836e249cbd886584af7ce29..e26491cb5a2780888a0cb77dcf1075bf0be25246 100644 (file)
@@ -1281,10 +1281,6 @@ void show_free_areas(void)
 
        get_zone_counts(&active, &inactive, &free);
 
-       printk("Free pages: %11ukB (%ukB HighMem)\n",
-               K(nr_free_pages()),
-               K(nr_free_highpages()));
-
        printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu "
                "unstable:%lu free:%u slab:%lu mapped:%lu pagetables:%lu\n",
                active,