* nr_active_pte_chains
@ 2002-07-19 1:54 ` William Lee Irwin III
0 siblings, 0 replies; 2+ messages in thread
From: William Lee Irwin III @ 2002-07-19 1:54 UTC (permalink / raw)
To: linux-mm; +Cc: linux-kernel, akpm
Dave McCracken's optimization of storing the pte's address directly in
the struct page defeats measuring pagetable occupancy by means of
measuring the space consumed by pte_chains. This patch reports a new
statistic independent of the allocated space for pte_chains describing
the number of reverse mappings performed.
Patch against 2.5.26 + akpm's pending patch series.
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/fs/proc/proc_misc.c linux-2.5.26/fs/proc/proc_misc.c
--- linux-2.5.26-virgin/fs/proc/proc_misc.c Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/fs/proc/proc_misc.c Thu Jul 18 20:05:48 2002
@@ -162,7 +162,8 @@
"Writeback: %8lu kB\n"
"PageTables: %8lu kB\n"
"PteChainTot: %8lu kB\n"
- "PteChainUsed: %8lu kB\n",
+ "PteChainUsed: %8lu kB\n"
+ "PteChainActv: %8lu\n",
K(i.totalram),
K(i.freeram),
K(i.sharedram),
@@ -180,7 +181,8 @@
K(ps.nr_writeback),
K(ps.nr_page_table_pages),
K(ps.nr_pte_chain_pages),
- ps.used_pte_chains_bytes >> 10
+ ps.used_pte_chains_bytes >> 10,
+ ps.nr_active_pte_chains
);
return proc_calc_metrics(page, start, off, count, eof, len);
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/include/linux/page-flags.h linux-2.5.26/include/linux/page-flags.h
--- linux-2.5.26-virgin/include/linux/page-flags.h Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/include/linux/page-flags.h Thu Jul 18 20:03:12 2002
@@ -81,6 +81,7 @@
unsigned long nr_page_table_pages;
unsigned long nr_pte_chain_pages;
unsigned long used_pte_chains_bytes;
+ unsigned long nr_active_pte_chains;
} ____cacheline_aligned_in_smp page_states[NR_CPUS];
extern void get_page_state(struct page_state *ret);
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/mm/page_alloc.c linux-2.5.26/mm/page_alloc.c
--- linux-2.5.26-virgin/mm/page_alloc.c Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/mm/page_alloc.c Thu Jul 18 18:00:26 2002
@@ -568,6 +568,7 @@
ret->nr_page_table_pages += ps->nr_page_table_pages;
ret->nr_pte_chain_pages += ps->nr_pte_chain_pages;
ret->used_pte_chains_bytes += ps->used_pte_chains_bytes;
+ ret->nr_active_pte_chains += ps->nr_active_pte_chains;
}
}
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/mm/rmap.c linux-2.5.26/mm/rmap.c
--- linux-2.5.26-virgin/mm/rmap.c Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/mm/rmap.c Thu Jul 18 17:52:30 2002
@@ -148,6 +148,7 @@
}
pte_chain_unlock(page);
+ inc_page_state(nr_active_pte_chains);
}
/**
@@ -209,8 +210,8 @@
out:
pte_chain_unlock(page);
+ dec_page_state(nr_active_pte_chains);
return;
-
}
/**
^ permalink raw reply [flat|nested] 2+ messages in thread
* nr_active_pte_chains
@ 2002-07-19 1:54 ` William Lee Irwin III
0 siblings, 0 replies; 2+ messages in thread
From: William Lee Irwin III @ 2002-07-19 1:54 UTC (permalink / raw)
To: linux-mm; +Cc: linux-kernel, akpm
Dave McCracken's optimization of storing the pte's address directly in
the struct page defeats measuring pagetable occupancy by means of
measuring the space consumed by pte_chains. This patch reports a new
statistic independent of the allocated space for pte_chains describing
the number of reverse mappings performed.
Patch against 2.5.26 + akpm's pending patch series.
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/fs/proc/proc_misc.c linux-2.5.26/fs/proc/proc_misc.c
--- linux-2.5.26-virgin/fs/proc/proc_misc.c Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/fs/proc/proc_misc.c Thu Jul 18 20:05:48 2002
@@ -162,7 +162,8 @@
"Writeback: %8lu kB\n"
"PageTables: %8lu kB\n"
"PteChainTot: %8lu kB\n"
- "PteChainUsed: %8lu kB\n",
+ "PteChainUsed: %8lu kB\n"
+ "PteChainActv: %8lu\n",
K(i.totalram),
K(i.freeram),
K(i.sharedram),
@@ -180,7 +181,8 @@
K(ps.nr_writeback),
K(ps.nr_page_table_pages),
K(ps.nr_pte_chain_pages),
- ps.used_pte_chains_bytes >> 10
+ ps.used_pte_chains_bytes >> 10,
+ ps.nr_active_pte_chains
);
return proc_calc_metrics(page, start, off, count, eof, len);
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/include/linux/page-flags.h linux-2.5.26/include/linux/page-flags.h
--- linux-2.5.26-virgin/include/linux/page-flags.h Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/include/linux/page-flags.h Thu Jul 18 20:03:12 2002
@@ -81,6 +81,7 @@
unsigned long nr_page_table_pages;
unsigned long nr_pte_chain_pages;
unsigned long used_pte_chains_bytes;
+ unsigned long nr_active_pte_chains;
} ____cacheline_aligned_in_smp page_states[NR_CPUS];
extern void get_page_state(struct page_state *ret);
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/mm/page_alloc.c linux-2.5.26/mm/page_alloc.c
--- linux-2.5.26-virgin/mm/page_alloc.c Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/mm/page_alloc.c Thu Jul 18 18:00:26 2002
@@ -568,6 +568,7 @@
ret->nr_page_table_pages += ps->nr_page_table_pages;
ret->nr_pte_chain_pages += ps->nr_pte_chain_pages;
ret->used_pte_chains_bytes += ps->used_pte_chains_bytes;
+ ret->nr_active_pte_chains += ps->nr_active_pte_chains;
}
}
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.5.26-virgin/mm/rmap.c linux-2.5.26/mm/rmap.c
--- linux-2.5.26-virgin/mm/rmap.c Thu Jul 18 18:45:25 2002
+++ linux-2.5.26/mm/rmap.c Thu Jul 18 17:52:30 2002
@@ -148,6 +148,7 @@
}
pte_chain_unlock(page);
+ inc_page_state(nr_active_pte_chains);
}
/**
@@ -209,8 +210,8 @@
out:
pte_chain_unlock(page);
+ dec_page_state(nr_active_pte_chains);
return;
-
}
/**
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-19 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-19 1:54 nr_active_pte_chains William Lee Irwin III
2002-07-19 1:54 ` nr_active_pte_chains William Lee Irwin III
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.