public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, Hugh Dickins <hugh@veritas.com>,
	Con Kolivas <kernel@kolivas.org>,
	Marcelo Tosatti <marcelo@kvack.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Christoph Lameter <clameter@sgi.com>, Andi Kleen <ak@suse.de>
Subject: [RFC 2/8] Make display of highmem counters conditional on CONFIG_HIGHMEM
Date: Mon, 3 Jul 2006 14:55:45 -0700 (PDT)	[thread overview]
Message-ID: <20060703215545.7566.79158.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060703215534.7566.8168.sendpatchset@schroedinger.engr.sgi.com>

Change 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 zero highmem values if
CONFIG_HIGHMEM is not set.

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

Index: linux-2.6.17-mm6/drivers/base/node.c
===================================================================
--- linux-2.6.17-mm6.orig/drivers/base/node.c	2006-07-03 13:47:14.847034002 -0700
+++ linux-2.6.17-mm6/drivers/base/node.c	2006-07-03 14:00:54.064935322 -0700
@@ -54,10 +54,12 @@ static ssize_t node_read_meminfo(struct 
 		       "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 
 		       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: linux-2.6.17-mm6/fs/proc/proc_misc.c
===================================================================
--- linux-2.6.17-mm6.orig/fs/proc/proc_misc.c	2006-07-03 13:47:19.547915149 -0700
+++ linux-2.6.17-mm6/fs/proc/proc_misc.c	2006-07-03 14:01:28.790330184 -0700
@@ -157,10 +157,12 @@ static int meminfo_read_proc(char *page,
 		"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,
 		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: linux-2.6.17-mm6/mm/page_alloc.c
===================================================================
--- linux-2.6.17-mm6.orig/mm/page_alloc.c	2006-07-03 13:58:32.611757801 -0700
+++ linux-2.6.17-mm6/mm/page_alloc.c	2006-07-03 14:03:19.964129358 -0700
@@ -1394,9 +1394,13 @@ void show_free_areas(void)
 
 	get_zone_counts(&active, &inactive, &free);
 
+#ifdef CONFIG_HIGHMEM
 	printk("Free pages: %11ukB (%ukB HighMem)\n",
 		K(nr_free_pages()),
 		K(nr_free_highpages()));
+#else
+	printk("Free pages: %11ukB\n", K(nr_free_pages()));
+#endif
 
 	printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu "
 		"unstable:%lu free:%u slab:%lu mapped:%lu pagetables:%lu\n",

  parent reply	other threads:[~2006-07-03 21:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 21:55 [RFC 0/8] Reduce MAX_NR_ZONES and remove useless zones Christoph Lameter
2006-07-03 21:55 ` [RFC 1/8] Rework mmzone.h: Make DMA32 and HIGHMEM optional Christoph Lameter
2006-07-03 22:28   ` Andi Kleen
2006-07-03 21:55 ` Christoph Lameter [this message]
2006-07-03 21:55 ` [RFC 3/8] Move HIGHMEM counter into highmem.c/.h Christoph Lameter
2006-07-04  5:47   ` KAMEZAWA Hiroyuki
2006-07-04  5:56     ` Christoph Lameter
2006-07-04  6:20       ` Andrew Morton
2006-07-04 15:20         ` Christoph Lameter
2006-07-04 16:50           ` Nick Piggin
2006-07-05  0:17             ` KAMEZAWA Hiroyuki
2006-07-03 21:55 ` [RFC 4/8] Remove display of counters for not available zones Christoph Lameter
2006-07-03 21:56 ` [RFC 5/8] swap_prefetch: Make use of ZONE_HIGHMEM dependend on CONFIG_HIGHMEM Christoph Lameter
2006-07-03 21:56 ` [RFC 6/8] Fix MAX_NR_ZONES array initializations in various arches Christoph Lameter
2006-07-03 21:56 ` [RFC 7/8] Fix strange uses of MAX_NR_ZONES Christoph Lameter
2006-07-03 21:56 ` [RFC 8/8] Fix i386 SRAT check for MAX_NR_ZONES Christoph Lameter
2006-07-04  5:52   ` KAMEZAWA Hiroyuki
2006-07-04  5:53     ` Christoph Lameter
2006-07-03 22:17 ` [RFC 0/8] Reduce MAX_NR_ZONES and remove useless zones Christoph Hellwig
2006-07-03 23:26   ` Christoph Lameter
2006-07-03 23:47     ` Andi Kleen
2006-07-03 23:53       ` Christoph Lameter
2006-07-04 12:04       ` Christoph Hellwig
2006-07-04 12:02     ` Christoph Hellwig
2006-07-04 15:10       ` Christoph Lameter
2006-07-04 15:23         ` Andi Kleen
2006-07-04 16:16           ` Christoph Lameter
2006-07-04 16:23             ` Arjan van de Ven
2006-07-04 16:41               ` Christoph Lameter
2006-07-04 16:47                 ` Arjan van de Ven
2006-07-04 16:52                 ` Andi Kleen
2006-07-04 16:25             ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060703215545.7566.79158.sendpatchset@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox