Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4455abb authored by Thadeu Lima de Souza Cascardo's avatar Thadeu Lima de Souza Cascardo Committed by Linus Torvalds
Browse files

mm: only build per-node scan_unevictable functions when NUMA is enabled



Non-NUMA systems do never create these files anyway, since they are only
created by driver subsystem when NUMA is configured.

[akpm@linux-foundation.org: cleanup]
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f19e77a3
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -271,8 +271,18 @@ extern void scan_mapping_unevictable_pages(struct address_space *);
extern unsigned long scan_unevictable_pages;
extern unsigned long scan_unevictable_pages;
extern int scan_unevictable_handler(struct ctl_table *, int,
extern int scan_unevictable_handler(struct ctl_table *, int,
					void __user *, size_t *, loff_t *);
					void __user *, size_t *, loff_t *);
#ifdef CONFIG_NUMA
extern int scan_unevictable_register_node(struct node *node);
extern int scan_unevictable_register_node(struct node *node);
extern void scan_unevictable_unregister_node(struct node *node);
extern void scan_unevictable_unregister_node(struct node *node);
#else
static inline int scan_unevictable_register_node(struct node *node)
{
	return 0;
}
static inline void scan_unevictable_unregister_node(struct node *node)
{
}
#endif


extern int kswapd_run(int nid);
extern int kswapd_run(int nid);
extern void kswapd_stop(int nid);
extern void kswapd_stop(int nid);
+2 −1
Original line number Original line Diff line number Diff line
@@ -2986,6 +2986,7 @@ int scan_unevictable_handler(struct ctl_table *table, int write,
	return 0;
	return 0;
}
}


#ifdef CONFIG_NUMA
/*
/*
 * per node 'scan_unevictable_pages' attribute.  On demand re-scan of
 * per node 'scan_unevictable_pages' attribute.  On demand re-scan of
 * a specified node's per zone unevictable lists for evictable pages.
 * a specified node's per zone unevictable lists for evictable pages.
@@ -3032,4 +3033,4 @@ void scan_unevictable_unregister_node(struct node *node)
{
{
	sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages);
	sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages);
}
}
#endif