aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorDan Magenheimer <dan.magenheimer@oracle.com>2013-04-30 18:27:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:01 -0400
commit10a7a0771399a57a297fca9615450dbb3f88081a (patch)
tree7c8564daf7ce2698277a4a38edb9ef0f636cb429 /include/xen
parentff610a1d55da22bf95bbc6a8b193e052169b34b7 (diff)
xen: tmem: enable Xen tmem shim to be built/loaded as a module
Allow Xen tmem shim to be built/loaded as a module. Xen self-ballooning and frontswap-selfshrinking are now also "lazily" initialized when the Xen tmem shim is loaded as a module, unless explicitly disabled by module parameters. Note runtime dependency disallows loading if cleancache/frontswap lazy initialization patches are not present. If built-in (not built as a module), the original mechanism of enabling via a kernel boot parameter is retained, but this should be considered deprecated. Note that module unload is explicitly not yet supported. [v1: Removed the [CLEANCACHE|FRONTSWAP]_HAS_LAZY_INIT ifdef] [v2: Squashed the xen/tmem: Remove the subsys call patch in] [akpm@linux-foundation.org: fix build (disable_frontswap_selfshrinking undeclared)] Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Andor Daam <andor.daam@googlemail.com> Cc: Florian Schmaus <fschmaus@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Stefan Hengelein <ilendir@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/tmem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/xen/tmem.h b/include/xen/tmem.h
index 591550a22ac7..3930a90045ff 100644
--- a/include/xen/tmem.h
+++ b/include/xen/tmem.h
@@ -3,7 +3,15 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6#ifdef CONFIG_XEN_TMEM_MODULE
7#define tmem_enabled true
8#else
6/* defined in drivers/xen/tmem.c */ 9/* defined in drivers/xen/tmem.c */
7extern bool tmem_enabled; 10extern bool tmem_enabled;
11#endif
12
13#ifdef CONFIG_XEN_SELFBALLOONING
14extern int xen_selfballoon_init(bool, bool);
15#endif
8 16
9#endif /* _XEN_TMEM_H */ 17#endif /* _XEN_TMEM_H */