diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-09-26 02:31:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:48:46 -0400 |
commit | 182e8e237349e7b6354f45aee4780b6423fd6a50 (patch) | |
tree | a1b9fc186a514e547eb257803616d67ba7b69976 | |
parent | f06a96844a577c43249fce25809a4fae07407f46 (diff) |
[PATCH] reduce MAX_NR_ZONES: make display of highmem counters conditional on CONFIG_HIGHMEM
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>
-rw-r--r-- | drivers/base/node.c | 4 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 4 | ||||
-rw-r--r-- | mm/page_alloc.c | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index e9b0957f15d1..e09f5c2c11ee 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -54,10 +54,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
54 | "Node %d MemUsed: %8lu kB\n" | 54 | "Node %d MemUsed: %8lu kB\n" |
55 | "Node %d Active: %8lu kB\n" | 55 | "Node %d Active: %8lu kB\n" |
56 | "Node %d Inactive: %8lu kB\n" | 56 | "Node %d Inactive: %8lu kB\n" |
57 | #ifdef CONFIG_HIGHMEM | ||
57 | "Node %d HighTotal: %8lu kB\n" | 58 | "Node %d HighTotal: %8lu kB\n" |
58 | "Node %d HighFree: %8lu kB\n" | 59 | "Node %d HighFree: %8lu kB\n" |
59 | "Node %d LowTotal: %8lu kB\n" | 60 | "Node %d LowTotal: %8lu kB\n" |
60 | "Node %d LowFree: %8lu kB\n" | 61 | "Node %d LowFree: %8lu kB\n" |
62 | #endif | ||
61 | "Node %d Dirty: %8lu kB\n" | 63 | "Node %d Dirty: %8lu kB\n" |
62 | "Node %d Writeback: %8lu kB\n" | 64 | "Node %d Writeback: %8lu kB\n" |
63 | "Node %d FilePages: %8lu kB\n" | 65 | "Node %d FilePages: %8lu kB\n" |
@@ -72,10 +74,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
72 | nid, K(i.totalram - i.freeram), | 74 | nid, K(i.totalram - i.freeram), |
73 | nid, K(active), | 75 | nid, K(active), |
74 | nid, K(inactive), | 76 | nid, K(inactive), |
77 | #ifdef CONFIG_HIGHMEM | ||
75 | nid, K(i.totalhigh), | 78 | nid, K(i.totalhigh), |
76 | nid, K(i.freehigh), | 79 | nid, K(i.freehigh), |
77 | nid, K(i.totalram - i.totalhigh), | 80 | nid, K(i.totalram - i.totalhigh), |
78 | nid, K(i.freeram - i.freehigh), | 81 | nid, K(i.freeram - i.freehigh), |
82 | #endif | ||
79 | nid, K(node_page_state(nid, NR_FILE_DIRTY)), | 83 | nid, K(node_page_state(nid, NR_FILE_DIRTY)), |
80 | nid, K(node_page_state(nid, NR_WRITEBACK)), | 84 | nid, K(node_page_state(nid, NR_WRITEBACK)), |
81 | nid, K(node_page_state(nid, NR_FILE_PAGES)), | 85 | nid, K(node_page_state(nid, NR_FILE_PAGES)), |
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 942156225447..caa0a51560a0 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -157,10 +157,12 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
157 | "SwapCached: %8lu kB\n" | 157 | "SwapCached: %8lu kB\n" |
158 | "Active: %8lu kB\n" | 158 | "Active: %8lu kB\n" |
159 | "Inactive: %8lu kB\n" | 159 | "Inactive: %8lu kB\n" |
160 | #ifdef CONFIG_HIGHMEM | ||
160 | "HighTotal: %8lu kB\n" | 161 | "HighTotal: %8lu kB\n" |
161 | "HighFree: %8lu kB\n" | 162 | "HighFree: %8lu kB\n" |
162 | "LowTotal: %8lu kB\n" | 163 | "LowTotal: %8lu kB\n" |
163 | "LowFree: %8lu kB\n" | 164 | "LowFree: %8lu kB\n" |
165 | #endif | ||
164 | "SwapTotal: %8lu kB\n" | 166 | "SwapTotal: %8lu kB\n" |
165 | "SwapFree: %8lu kB\n" | 167 | "SwapFree: %8lu kB\n" |
166 | "Dirty: %8lu kB\n" | 168 | "Dirty: %8lu kB\n" |
@@ -183,10 +185,12 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
183 | K(total_swapcache_pages), | 185 | K(total_swapcache_pages), |
184 | K(active), | 186 | K(active), |
185 | K(inactive), | 187 | K(inactive), |
188 | #ifdef CONFIG_HIGHMEM | ||
186 | K(i.totalhigh), | 189 | K(i.totalhigh), |
187 | K(i.freehigh), | 190 | K(i.freehigh), |
188 | K(i.totalram-i.totalhigh), | 191 | K(i.totalram-i.totalhigh), |
189 | K(i.freeram-i.freehigh), | 192 | K(i.freeram-i.freehigh), |
193 | #endif | ||
190 | K(i.totalswap), | 194 | K(i.totalswap), |
191 | K(i.freeswap), | 195 | K(i.freeswap), |
192 | K(global_page_state(NR_FILE_DIRTY)), | 196 | K(global_page_state(NR_FILE_DIRTY)), |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4b33878e9488..e26491cb5a27 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1281,10 +1281,6 @@ void show_free_areas(void) | |||
1281 | 1281 | ||
1282 | get_zone_counts(&active, &inactive, &free); | 1282 | get_zone_counts(&active, &inactive, &free); |
1283 | 1283 | ||
1284 | printk("Free pages: %11ukB (%ukB HighMem)\n", | ||
1285 | K(nr_free_pages()), | ||
1286 | K(nr_free_highpages())); | ||
1287 | |||
1288 | printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu " | 1284 | printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu " |
1289 | "unstable:%lu free:%u slab:%lu mapped:%lu pagetables:%lu\n", | 1285 | "unstable:%lu free:%u slab:%lu mapped:%lu pagetables:%lu\n", |
1290 | active, | 1286 | active, |