diff options
-rw-r--r-- | include/linux/swap.h | 10 | ||||
-rw-r--r-- | mm/vmscan.c | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 7cdd63366f88..eba53e71d2cc 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -271,8 +271,18 @@ extern void scan_mapping_unevictable_pages(struct address_space *); | |||
271 | extern unsigned long scan_unevictable_pages; | 271 | extern unsigned long scan_unevictable_pages; |
272 | extern int scan_unevictable_handler(struct ctl_table *, int, | 272 | extern int scan_unevictable_handler(struct ctl_table *, int, |
273 | void __user *, size_t *, loff_t *); | 273 | void __user *, size_t *, loff_t *); |
274 | #ifdef CONFIG_NUMA | ||
274 | extern int scan_unevictable_register_node(struct node *node); | 275 | extern int scan_unevictable_register_node(struct node *node); |
275 | extern void scan_unevictable_unregister_node(struct node *node); | 276 | extern void scan_unevictable_unregister_node(struct node *node); |
277 | #else | ||
278 | static inline int scan_unevictable_register_node(struct node *node) | ||
279 | { | ||
280 | return 0; | ||
281 | } | ||
282 | static inline void scan_unevictable_unregister_node(struct node *node) | ||
283 | { | ||
284 | } | ||
285 | #endif | ||
276 | 286 | ||
277 | extern int kswapd_run(int nid); | 287 | extern int kswapd_run(int nid); |
278 | extern void kswapd_stop(int nid); | 288 | extern void kswapd_stop(int nid); |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 6cbc1aac23ae..f5871ee50000 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2986,6 +2986,7 @@ int scan_unevictable_handler(struct ctl_table *table, int write, | |||
2986 | return 0; | 2986 | return 0; |
2987 | } | 2987 | } |
2988 | 2988 | ||
2989 | #ifdef CONFIG_NUMA | ||
2989 | /* | 2990 | /* |
2990 | * per node 'scan_unevictable_pages' attribute. On demand re-scan of | 2991 | * per node 'scan_unevictable_pages' attribute. On demand re-scan of |
2991 | * a specified node's per zone unevictable lists for evictable pages. | 2992 | * a specified node's per zone unevictable lists for evictable pages. |
@@ -3032,4 +3033,4 @@ void scan_unevictable_unregister_node(struct node *node) | |||
3032 | { | 3033 | { |
3033 | sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages); | 3034 | sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages); |
3034 | } | 3035 | } |
3035 | 3036 | #endif | |