From: Christoph Lameter <clameter@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, Hugh Dickins <hugh@veritas.com>,
Nick Piggin <nickpiggin@yahoo.com.au>,
linux-mm@kvack.org, Andi Kleen <ak@suse.de>,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 13/14] Conversion of nr_bounce to per zone counter
Date: Thu, 8 Jun 2006 16:03:47 -0700 (PDT) [thread overview]
Message-ID: <20060608230347.25121.47306.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060608230239.25121.83503.sendpatchset@schroedinger.engr.sgi.com>
Conversion of nr_bounce to a per zone counter
nr_bounce is only used for proc output. So it could be left as an eventcounter.
However, the eventcounters are not accurate and nr_bounce is categorizing one
type of page in a zone. So we really need this to also be a per zone counter.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.17-rc6-mm1/include/linux/mmzone.h
===================================================================
--- linux-2.6.17-rc6-mm1.orig/include/linux/mmzone.h 2006-06-08 14:57:31.889341062 -0700
+++ linux-2.6.17-rc6-mm1/include/linux/mmzone.h 2006-06-08 15:01:43.192115178 -0700
@@ -55,6 +55,7 @@ enum zone_stat_item {
NR_DIRTY,
NR_WRITEBACK,
NR_UNSTABLE, /* NFS unstable pages */
+ NR_BOUNCE,
NR_STAT_ITEMS };
#ifdef CONFIG_SMP
Index: linux-2.6.17-rc6-mm1/include/linux/page-flags.h
===================================================================
--- linux-2.6.17-rc6-mm1.orig/include/linux/page-flags.h 2006-06-08 14:58:56.228837442 -0700
+++ linux-2.6.17-rc6-mm1/include/linux/page-flags.h 2006-06-08 15:01:43.193091680 -0700
@@ -168,7 +168,6 @@ struct page_state {
unsigned long allocstall; /* direct reclaim calls */
unsigned long pgrotated; /* pages rotated to tail of the LRU */
- unsigned long nr_bounce; /* pages for bounce buffers */
};
extern void get_full_page_state(struct page_state *ret);
Index: linux-2.6.17-rc6-mm1/mm/highmem.c
===================================================================
--- linux-2.6.17-rc6-mm1.orig/mm/highmem.c 2006-06-05 17:57:02.000000000 -0700
+++ linux-2.6.17-rc6-mm1/mm/highmem.c 2006-06-08 15:01:43.194068182 -0700
@@ -316,7 +316,7 @@ static void bounce_end_io(struct bio *bi
continue;
mempool_free(bvec->bv_page, pool);
- dec_page_state(nr_bounce);
+ dec_zone_page_state(bvec->bv_page, NR_BOUNCE);
}
bio_endio(bio_orig, bio_orig->bi_size, err);
@@ -397,7 +397,7 @@ static void __blk_queue_bounce(request_q
to->bv_page = mempool_alloc(pool, q->bounce_gfp);
to->bv_len = from->bv_len;
to->bv_offset = from->bv_offset;
- inc_page_state(nr_bounce);
+ inc_zone_page_state(to->bv_page, NR_BOUNCE);
if (rw == WRITE) {
char *vto, *vfrom;
Index: linux-2.6.17-rc6-mm1/mm/page_alloc.c
===================================================================
--- linux-2.6.17-rc6-mm1.orig/mm/page_alloc.c 2006-06-08 14:58:56.232743450 -0700
+++ linux-2.6.17-rc6-mm1/mm/page_alloc.c 2006-06-08 15:02:13.761508395 -0700
@@ -630,7 +630,7 @@ static int rmqueue_bulk(struct zone *zon
char *vm_stat_item_descr[NR_STAT_ITEMS] = {
"mapped", "pagecache", "slab", "pagetable", "dirty", "writeback",
- "unstable"
+ "unstable", "bounce"
};
/*
@@ -2788,6 +2788,7 @@ static char *vmstat_text[] = {
"nr_dirty",
"nr_writeback",
"nr_unstable",
+ "nr_bounce",
/* Page state */
"pgpgin",
@@ -2834,8 +2835,7 @@ static char *vmstat_text[] = {
"pageoutrun",
"allocstall",
- "pgrotated",
- "nr_bounce",
+ "pgrotated"
};
static void *vmstat_start(struct seq_file *m, loff_t *pos)
Index: linux-2.6.17-rc6-mm1/drivers/base/node.c
===================================================================
--- linux-2.6.17-rc6-mm1.orig/drivers/base/node.c 2006-06-08 14:58:56.229813944 -0700
+++ linux-2.6.17-rc6-mm1/drivers/base/node.c 2006-06-08 15:01:43.196997687 -0700
@@ -67,7 +67,8 @@ static ssize_t node_read_meminfo(struct
"Node %d Unstable: %8lu kB\n"
"Node %d Mapped: %8lu kB\n"
"Node %d Pagecache: %8lu kB\n"
- "Node %d Slab: %8lu kB\n",
+ "Node %d Slab: %8lu kB\n"
+ "Node %d Bounce: %8lu kB\n",
nid, K(i.totalram),
nid, K(i.freeram),
nid, K(i.totalram - i.freeram),
@@ -82,7 +83,8 @@ static ssize_t node_read_meminfo(struct
nid, K(nr[NR_UNSTABLE]),
nid, K(nr[NR_MAPPED]),
nid, K(nr[NR_PAGECACHE]),
- nid, K(nr[NR_SLAB]));
+ nid, K(nr[NR_SLAB]),
+ nid, K(nr[NR_BOUNCE]));
n += hugetlb_report_node_meminfo(nid, buf + n);
return n;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-06-08 23:03 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-08 23:02 [PATCH 00/14] Zoned VM counters V2 Christoph Lameter
2006-06-08 23:02 ` [PATCH 01/14] Per zone counter functionality Christoph Lameter
2006-06-09 4:00 ` Andrew Morton
2006-06-09 4:38 ` Andi Kleen
2006-06-09 9:22 ` Peter Zijlstra
2006-06-09 9:29 ` Andrew Morton
2006-06-09 18:19 ` Horst von Brand
2006-06-09 15:54 ` Christoph Lameter
2006-06-09 17:06 ` Andrew Morton
2006-06-09 17:18 ` Christoph Lameter
2006-06-09 17:38 ` Andrew Morton
2006-06-09 4:28 ` Andi Kleen
2006-06-09 16:00 ` Christoph Lameter
2006-06-08 23:02 ` [PATCH 02/14] Include per zone counters in /proc/vmstat Christoph Lameter
2006-06-08 23:02 ` [PATCH 03/14] Conversion of nr_mapped to per zone counter Christoph Lameter
2006-06-08 23:03 ` [PATCH 04/14] Conversion of nr_pagecache " Christoph Lameter
2006-06-08 23:03 ` [PATCH 04/14] Use per zone counters to remove zone_reclaim_interval Christoph Lameter
2006-06-09 4:00 ` Andrew Morton
2006-06-09 18:54 ` zoned VM stats: Add NR_ANON Christoph Lameter
2006-06-10 4:32 ` KAMEZAWA Hiroyuki
2006-06-10 4:52 ` Christoph Lameter
2006-06-08 23:03 ` [PATCH 06/14] Add per zone counters to zone node and global VM statistics Christoph Lameter
2006-06-09 4:01 ` Andrew Morton
2006-06-09 15:55 ` Christoph Lameter
2006-06-08 23:03 ` [PATCH 07/14] Conversion of nr_slab to per zone counter Christoph Lameter
2006-06-08 23:03 ` [PATCH 08/14] Conversion of nr_pagetable " Christoph Lameter
2006-06-08 23:03 ` [PATCH 09/14] Conversion of nr_dirty " Christoph Lameter
2006-06-08 23:03 ` [PATCH 10/14] Conversion of nr_writeback " Christoph Lameter
2006-06-08 23:03 ` [PATCH 11/14] Conversion of nr_unstable " Christoph Lameter
2006-06-08 23:03 ` [PATCH 12/14] Remove unused get_page_stat functions Christoph Lameter
2006-06-08 23:03 ` Christoph Lameter [this message]
2006-06-08 23:03 ` [PATCH 14/14] Remove useless writeback structure Christoph Lameter
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=20060608230347.25121.47306.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--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