aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/tmem.c
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-05-08 17:12:44 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-05-15 10:27:47 -0400
commit2ca62b044457e3aacaa06684974b0ff40b2f5a94 (patch)
tree030d10ea6eb3bb31917c275c84963ab5c5f861f8 /drivers/xen/tmem.c
parent9fd19653faceef210f30901f7cee0ceb13c6f39a (diff)
xen/tmem: Remove the boot options and fold them in the tmem.X parameters.
If tmem is built-in or a module, the user has the option on the command line to influence it by doing: tmem.<some option> instead of having a variety of "nocleancache", and "nofrontswap". The others: "noselfballooning" and "selfballooning"; and "noselfshrink" are in a different driver xen-selfballoon.c and the patches: xen/tmem: Remove the usage of 'noselfshrink' and use 'tmem.selfshrink' bool instead. xen/tmem: Remove the usage of 'noselfballoon','selfballoon' and use 'tmem.selfballon' bool instead. remove them. Also add documentation. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/tmem.c')
-rw-r--r--drivers/xen/tmem.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c
index 411c7e3df46c..c1df0ff89878 100644
--- a/drivers/xen/tmem.c
+++ b/drivers/xen/tmem.c
@@ -33,39 +33,19 @@ __setup("tmem", enable_tmem);
33 33
34#ifdef CONFIG_CLEANCACHE 34#ifdef CONFIG_CLEANCACHE
35static bool cleancache __read_mostly = true; 35static bool cleancache __read_mostly = true;
36static bool selfballooning __read_mostly = true;
37#ifdef CONFIG_XEN_TMEM_MODULE
38module_param(cleancache, bool, S_IRUGO); 36module_param(cleancache, bool, S_IRUGO);
37static bool selfballooning __read_mostly = true;
39module_param(selfballooning, bool, S_IRUGO); 38module_param(selfballooning, bool, S_IRUGO);
40#else
41static int __init no_cleancache(char *s)
42{
43 cleancache = false;
44 return 1;
45}
46__setup("nocleancache", no_cleancache);
47#endif
48#endif /* CONFIG_CLEANCACHE */ 39#endif /* CONFIG_CLEANCACHE */
49 40
50#ifdef CONFIG_FRONTSWAP 41#ifdef CONFIG_FRONTSWAP
51static bool frontswap __read_mostly = true; 42static bool frontswap __read_mostly = true;
52#ifdef CONFIG_XEN_TMEM_MODULE
53module_param(frontswap, bool, S_IRUGO); 43module_param(frontswap, bool, S_IRUGO);
54#else
55static int __init no_frontswap(char *s)
56{
57 frontswap = false;
58 return 1;
59}
60__setup("nofrontswap", no_frontswap);
61#endif
62#endif /* CONFIG_FRONTSWAP */ 44#endif /* CONFIG_FRONTSWAP */
63 45
64#ifdef CONFIG_XEN_SELFBALLOONING 46#ifdef CONFIG_XEN_SELFBALLOONING
65static bool frontswap_selfshrinking __read_mostly = true; 47static bool selfshrinking __read_mostly = true;
66#ifdef CONFIG_XEN_TMEM_MODULE 48module_param(selfshrinking, bool, S_IRUGO);
67module_param(frontswap_selfshrinking, bool, S_IRUGO);
68#endif
69#endif /* CONFIG_XEN_SELFBALLOONING */ 49#endif /* CONFIG_XEN_SELFBALLOONING */
70 50
71#define TMEM_CONTROL 0 51#define TMEM_CONTROL 0
@@ -423,7 +403,7 @@ static int xen_tmem_init(void)
423 } 403 }
424#endif 404#endif
425#ifdef CONFIG_XEN_SELFBALLOONING 405#ifdef CONFIG_XEN_SELFBALLOONING
426 xen_selfballoon_init(selfballooning, frontswap_selfshrinking); 406 xen_selfballoon_init(selfballooning, selfshrinking);
427#endif 407#endif
428 return 0; 408 return 0;
429} 409}