login
Header Space

 
 

[patch 20/21] account mlocked pages

Previous thread: [patch 21/21] cull non-reclaimable anon pages from the LRU at fault time by Rik van Riel on Thursday, February 28, 2008 - 3:29 pm. (3 messages)

Next thread: [patch 18/21] mlock vma pages under mmap_sem held for read by Rik van Riel on Thursday, February 28, 2008 - 3:29 pm. (1 message)
To: <linux-kernel@...>
Cc: KOSAKI Motohiro <kosaki.motohiro@...>, Lee Schermerhorn <Lee.Schermerhorn@...>, <linux-mm@...>, Nick Piggin <npiggin@...>
Date: Thursday, February 28, 2008 - 3:29 pm

V2 -&gt; V3:
+ rebase to 23-mm1 atop RvR's split lru series
+ fix definitions of NR_MLOCK to fix build errors when not configured.

V1 -&gt; V2:
+  new in V2 -- pulled in &amp; reworked from Nick's previous series

  From: Nick Piggin &lt;npiggin@suse.de&gt;
  To: Linux Memory Management &lt;linux-mm@kvack.org&gt;
  Cc: Nick Piggin &lt;npiggin@suse.de&gt;, Andrew Morton &lt;akpm@osdl.org&gt;
  Subject: [patch 4/4] mm: account mlocked pages
  Date:	Mon, 12 Mar 2007 07:39:14 +0100 (CET)

Add NR_MLOCK zone page state, which provides a (conservative) count of
mlocked pages (actually, the number of mlocked pages moved off the LRU).

Reworked by lts to fit in with the modified mlock page support in the
Reclaim Scalability series.  I don't know whether we'll want to keep
these stats in the long run, but during testing of this series, I find
them useful.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Lee Schermerhorn &lt;lee.schermerhorn@hp.com&gt;
Signed-off-by: Rik van Riel &lt;riel@redhat.com&gt;


Index: linux-2.6.25-rc2-mm1/drivers/base/node.c
===================================================================
--- linux-2.6.25-rc2-mm1.orig/drivers/base/node.c	2008-02-28 12:48:01.000000000 -0500
+++ linux-2.6.25-rc2-mm1/drivers/base/node.c	2008-02-28 12:49:19.000000000 -0500
@@ -55,6 +55,9 @@ static ssize_t node_read_meminfo(struct 
 		       "Node %d Inactive(file): %8lu kB\n"
 #ifdef CONFIG_NORECLAIM
 		       "Node %d Noreclaim:    %8lu kB\n"
+#ifdef CONFIG_NORECLAIM_MLOCK
+		       "Node %d Mlocked:       %8lu kB\n"
+#endif
 #endif
 #ifdef CONFIG_HIGHMEM
 		       "Node %d HighTotal:      %8lu kB\n"
@@ -82,6 +85,9 @@ static ssize_t node_read_meminfo(struct 
 		       nid, node_page_state(nid, NR_INACTIVE_FILE),
 #ifdef CONFIG_NORECLAIM
 		       nid, node_page_state(nid, NR_NORECLAIM),
+#ifdef CONFIG_NORECLAIM_MLOCK
+		       nid, K(node_page_state(nid, NR_MLOCK)),
+#endif
 #endif
 #ifdef CONFIG_HIGHMEM
 		       nid, K(i.totalhigh),
Index: lin...
Previous thread: [patch 21/21] cull non-reclaimable anon pages from the LRU at fault time by Rik van Riel on Thursday, February 28, 2008 - 3:29 pm. (3 messages)

Next thread: [patch 18/21] mlock vma pages under mmap_sem held for read by Rik van Riel on Thursday, February 28, 2008 - 3:29 pm. (1 message)
speck-geostationary