mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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. [[email protected]: fix one CONFIG_MMU=n build error] [[email protected]: adapt vmscan-unevictable-lru-scan-sysctl.patch to new sysfs API] Signed-off-by: Lee Schermerhorn <[email protected]> Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
64d6519dda
commit
af936a1606
6 changed files with 201 additions and 2 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/nodemask.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/swap.h>
|
||||
|
||||
static struct sysdev_class node_class = {
|
||||
.name = "node",
|
||||
|
|
@ -191,6 +192,8 @@ int register_node(struct node *node, int num, struct node *parent)
|
|||
sysdev_create_file(&node->sysdev, &attr_meminfo);
|
||||
sysdev_create_file(&node->sysdev, &attr_numastat);
|
||||
sysdev_create_file(&node->sysdev, &attr_distance);
|
||||
|
||||
scan_unevictable_register_node(node);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
|
@ -210,6 +213,8 @@ void unregister_node(struct node *node)
|
|||
sysdev_remove_file(&node->sysdev, &attr_numastat);
|
||||
sysdev_remove_file(&node->sysdev, &attr_distance);
|
||||
|
||||
scan_unevictable_unregister_node(node);
|
||||
|
||||
sysdev_unregister(&node->sysdev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue