All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled.patch added to -mm tree
@ 2010-08-25 22:32 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2010-08-25 22:32 UTC (permalink / raw)
  To: mm-commits; +Cc: cascardo, kosaki.motohiro, lee.schermerhorn


The patch titled
     mm: only build per-node scan_unevictable functions when NUMA is enabled
has been added to the -mm tree.  Its filename is
     mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mm: only build per-node scan_unevictable functions when NUMA is enabled
From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

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

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/swap.h |    5 +++++
 mm/vmscan.c          |    3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff -puN include/linux/swap.h~mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled include/linux/swap.h
--- a/include/linux/swap.h~mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled
+++ a/include/linux/swap.h
@@ -270,8 +270,13 @@ extern void scan_mapping_unevictable_pag
 extern unsigned long scan_unevictable_pages;
 extern int scan_unevictable_handler(struct ctl_table *, int,
 					void __user *, size_t *, loff_t *);
+#ifdef CONFIG_NUMA
 extern int scan_unevictable_register_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 void kswapd_stop(int nid);
diff -puN mm/vmscan.c~mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled mm/vmscan.c
--- a/mm/vmscan.c~mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled
+++ a/mm/vmscan.c
@@ -3033,6 +3033,7 @@ int scan_unevictable_handler(struct ctl_
 	return 0;
 }
 
+#ifdef CONFIG_NUMA
 /*
  * per node 'scan_unevictable_pages' attribute.  On demand re-scan of
  * a specified node's per zone unevictable lists for evictable pages.
@@ -3079,4 +3080,4 @@ void scan_unevictable_unregister_node(st
 {
 	sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-25 22:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 22:32 + mm-only-build-per-node-scan_unevictable-functions-when-numa-is-enabled.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.