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: [RFC3 12/14] Convert nr_unstable
Date: Wed, 14 Dec 2005 16:15:17 -0800 (PST) [thread overview]
Message-ID: <20051215001517.31405.23468.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20051215001415.31405.24898.sendpatchset@schroedinger.engr.sgi.com>
Per zone unstable pages
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.15-rc5-mm2/mm/swap_prefetch.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/mm/swap_prefetch.c 2005-12-14 15:35:38.000000000 -0800
+++ linux-2.6.15-rc5-mm2/mm/swap_prefetch.c 2005-12-14 15:37:43.000000000 -0800
@@ -319,7 +319,7 @@ static int prefetch_suitable(void)
goto out;
/* Delay prefetching if we have significant amounts of dirty data */
- pending_writes = global_page_state(NR_DIRTY) + ps.nr_unstable;
+ pending_writes = global_page_state(NR_DIRTY) + global_page_state(NR_UNSTABLE);
if (pending_writes > SWAP_CLUSTER_MAX)
goto out;
Index: linux-2.6.15-rc5-mm2/fs/fs-writeback.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/fs/fs-writeback.c 2005-12-14 15:34:57.000000000 -0800
+++ linux-2.6.15-rc5-mm2/fs/fs-writeback.c 2005-12-14 15:37:43.000000000 -0800
@@ -471,7 +471,7 @@ void sync_inodes_sb(struct super_block *
.sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_HOLD,
};
unsigned long nr_dirty = global_page_state(NR_DIRTY);
- unsigned long nr_unstable = read_page_state(nr_unstable);
+ unsigned long nr_unstable = global_page_state(NR_UNSTABLE);
wbc.nr_to_write = nr_dirty + nr_unstable +
(inodes_stat.nr_inodes - inodes_stat.nr_unused) +
Index: linux-2.6.15-rc5-mm2/mm/page_alloc.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/mm/page_alloc.c 2005-12-14 15:37:34.000000000 -0800
+++ linux-2.6.15-rc5-mm2/mm/page_alloc.c 2005-12-14 15:37:54.000000000 -0800
@@ -597,7 +597,8 @@ static int rmqueue_bulk(struct zone *zon
}
char *stat_item_descr[NR_STAT_ITEMS] = {
- "mapped","pagecache", "slab", "pagetable", "dirty", "writeback"
+ "mapped","pagecache", "slab", "pagetable", "dirty", "writeback",
+ "unstable"
};
/*
@@ -1781,7 +1782,7 @@ void show_free_areas(void)
inactive,
global_page_state(NR_DIRTY),
global_page_state(NR_WRITEBACK),
- ps.nr_unstable,
+ global_page_state(NR_UNSTABLE),
nr_free_pages(),
global_page_state(NR_SLAB),
global_page_state(NR_MAPPED),
Index: linux-2.6.15-rc5-mm2/fs/nfs/write.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/fs/nfs/write.c 2005-12-14 15:34:57.000000000 -0800
+++ linux-2.6.15-rc5-mm2/fs/nfs/write.c 2005-12-14 15:37:43.000000000 -0800
@@ -474,7 +474,7 @@ nfs_mark_request_commit(struct nfs_page
nfs_list_add_request(req, &nfsi->commit);
nfsi->ncommit++;
spin_unlock(&nfsi->req_lock);
- inc_page_state(nr_unstable);
+ inc_zone_page_state(req->wb_page, NR_UNSTABLE);
mark_inode_dirty(inode);
}
#endif
@@ -1272,7 +1272,6 @@ void nfs_commit_done(struct rpc_task *ta
{
struct nfs_write_data *data = calldata;
struct nfs_page *req;
- int res = 0;
dprintk("NFS: %4d nfs_commit_done (status %d)\n",
task->tk_pid, task->tk_status);
@@ -1306,9 +1305,8 @@ void nfs_commit_done(struct rpc_task *ta
nfs_mark_request_dirty(req);
next:
nfs_clear_page_writeback(req);
- res++;
+ dec_zone_page_state(req->wb_page, NR_UNSTABLE);
}
- sub_page_state(nr_unstable,res);
}
#endif
Index: linux-2.6.15-rc5-mm2/include/linux/page-flags.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/linux/page-flags.h 2005-12-14 15:35:38.000000000 -0800
+++ linux-2.6.15-rc5-mm2/include/linux/page-flags.h 2005-12-14 15:37:43.000000000 -0800
@@ -82,8 +82,7 @@
* allowed.
*/
struct page_state {
- unsigned long nr_unstable; /* NFS unstable pages */
-#define GET_PAGE_STATE_LAST nr_unstable
+#define GET_PAGE_STATE_LAST xxx
/*
* The below are zeroed by get_page_state(). Use get_full_page_state()
Index: linux-2.6.15-rc5-mm2/mm/page-writeback.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/mm/page-writeback.c 2005-12-14 15:35:38.000000000 -0800
+++ linux-2.6.15-rc5-mm2/mm/page-writeback.c 2005-12-14 15:37:43.000000000 -0800
@@ -110,7 +110,7 @@ struct writeback_state
static void get_writeback_state(struct writeback_state *wbs)
{
wbs->nr_dirty = global_page_state(NR_DIRTY);
- wbs->nr_unstable = read_page_state(nr_unstable);
+ wbs->nr_unstable = global_page_state(NR_UNSTABLE);
wbs->nr_mapped = global_page_state(NR_MAPPED);
wbs->nr_writeback = global_page_state(NR_WRITEBACK);
}
Index: linux-2.6.15-rc5-mm2/include/linux/mmzone.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/linux/mmzone.h 2005-12-14 15:35:38.000000000 -0800
+++ linux-2.6.15-rc5-mm2/include/linux/mmzone.h 2005-12-14 15:37:43.000000000 -0800
@@ -44,8 +44,8 @@ struct zone_padding {
#define ZONE_PADDING(name)
#endif
-enum zone_stat_item { NR_MAPPED, NR_PAGECACHE, NR_SLAB, NR_PAGETABLE, NR_DIRTY, NR_WRITEBACK };
-#define NR_STAT_ITEMS 6
+enum zone_stat_item { NR_MAPPED, NR_PAGECACHE, NR_SLAB, NR_PAGETABLE, NR_DIRTY, NR_WRITEBACK, NR_UNSTABLE };
+#define NR_STAT_ITEMS 7
struct per_cpu_pages {
int count; /* number of pages in the list */
--
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:[~2005-12-15 0:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 0:14 [RFC3 00/14] Zoned VM stats Christoph Lameter
2005-12-15 0:14 ` [RFC3 01/14] Add some consts for inlines in mm.h Christoph Lameter
2005-12-15 1:01 ` J.A. Magallon
2005-12-15 0:14 ` [RFC3 02/14] Basic counter functionality Christoph Lameter
2005-12-17 4:01 ` Marcelo Tosatti
2005-12-17 4:19 ` Marcelo Tosatti
2005-12-19 17:58 ` Christoph Lameter
2005-12-15 0:14 ` [RFC3 03/14] Convert nr_mapped Christoph Lameter
2005-12-15 0:14 ` [RFC3 04/14] Convert nr_pagecache Christoph Lameter
2005-12-15 0:14 ` [RFC3 05/14] Resurrect scan_control.may_swap Christoph Lameter
2005-12-15 0:14 ` [RFC3 06/14] Zone Reclaim Christoph Lameter
2005-12-15 0:14 ` [RFC3 07/14] Expanded node and zone statistics Christoph Lameter
2005-12-15 0:14 ` [RFC3 08/14] Convert nr_slab Christoph Lameter
2005-12-15 0:15 ` [RFC3 09/14] Convert nr_page_table Christoph Lameter
2005-12-15 0:15 ` [RFC3 10/14] Convert nr_dirty Christoph Lameter
2005-12-15 0:15 ` [RFC3 11/14] Convert nr_writeback Christoph Lameter
2005-12-15 0:15 ` Christoph Lameter [this message]
2005-12-15 0:15 ` [RFC3 13/14] Remove get_page_state functions Christoph Lameter
2005-12-15 0:15 ` [RFC3 14/14] Remove wbs 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=20051215001517.31405.23468.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