diff options
author | Lee Schermerhorn <lee.schermerhorn@hp.com> | 2008-10-18 23:26:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 11:52:31 -0400 |
commit | af936a1606246a10c145feac3770f6287f483f02 (patch) | |
tree | 8b1ca7fabb5c749ffdecd654519889c6c2ed2fb6 /drivers/base | |
parent | 64d6519dda3905dfb94d3f93c07c5f263f41813f (diff) |
vmscan: unevictable LRU scan sysctl
This patch adds a function to scan individual or all zones' unevictable
lists and move any pages that have become evictable onto the respective
zone's inactive list, where shrink_inactive_list() will deal with them.
Adds sysctl to scan all nodes, and per node attributes to individual
nodes' zones.
Kosaki: If evictable page found in unevictable lru when write
/proc/sys/vm/scan_unevictable_pages, print filename and file offset of
these pages.
[akpm@linux-foundation.org: fix one CONFIG_MMU=n build error]
[kosaki.motohiro@jp.fujitsu.com: adapt vmscan-unevictable-lru-scan-sysctl.patch to new sysfs API]
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/node.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index fb45d88a244..f5207090885 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/swap.h> | ||
16 | 17 | ||
17 | static struct sysdev_class node_class = { | 18 | static struct sysdev_class node_class = { |
18 | .name = "node", | 19 | .name = "node", |
@@ -191,6 +192,8 @@ int register_node(struct node *node, int num, struct node *parent) | |||
191 | sysdev_create_file(&node->sysdev, &attr_meminfo); | 192 | sysdev_create_file(&node->sysdev, &attr_meminfo); |
192 | sysdev_create_file(&node->sysdev, &attr_numastat); | 193 | sysdev_create_file(&node->sysdev, &attr_numastat); |
193 | sysdev_create_file(&node->sysdev, &attr_distance); | 194 | sysdev_create_file(&node->sysdev, &attr_distance); |
195 | |||
196 | scan_unevictable_register_node(node); | ||
194 | } | 197 | } |
195 | return error; | 198 | return error; |
196 | } | 199 | } |
@@ -210,6 +213,8 @@ void unregister_node(struct node *node) | |||
210 | sysdev_remove_file(&node->sysdev, &attr_numastat); | 213 | sysdev_remove_file(&node->sysdev, &attr_numastat); |
211 | sysdev_remove_file(&node->sysdev, &attr_distance); | 214 | sysdev_remove_file(&node->sysdev, &attr_distance); |
212 | 215 | ||
216 | scan_unevictable_unregister_node(node); | ||
217 | |||
213 | sysdev_unregister(&node->sysdev); | 218 | sysdev_unregister(&node->sysdev); |
214 | } | 219 | } |
215 | 220 | ||