diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-08 17:12:44 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-15 10:27:47 -0400 |
commit | 2ca62b044457e3aacaa06684974b0ff40b2f5a94 (patch) | |
tree | 030d10ea6eb3bb31917c275c84963ab5c5f861f8 /drivers/xen/tmem.c | |
parent | 9fd19653faceef210f30901f7cee0ceb13c6f39a (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.c | 28 |
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 |
35 | static bool cleancache __read_mostly = true; | 35 | static bool cleancache __read_mostly = true; |
36 | static bool selfballooning __read_mostly = true; | ||
37 | #ifdef CONFIG_XEN_TMEM_MODULE | ||
38 | module_param(cleancache, bool, S_IRUGO); | 36 | module_param(cleancache, bool, S_IRUGO); |
37 | static bool selfballooning __read_mostly = true; | ||
39 | module_param(selfballooning, bool, S_IRUGO); | 38 | module_param(selfballooning, bool, S_IRUGO); |
40 | #else | ||
41 | static 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 |
51 | static bool frontswap __read_mostly = true; | 42 | static bool frontswap __read_mostly = true; |
52 | #ifdef CONFIG_XEN_TMEM_MODULE | ||
53 | module_param(frontswap, bool, S_IRUGO); | 43 | module_param(frontswap, bool, S_IRUGO); |
54 | #else | ||
55 | static 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 |
65 | static bool frontswap_selfshrinking __read_mostly = true; | 47 | static bool selfshrinking __read_mostly = true; |
66 | #ifdef CONFIG_XEN_TMEM_MODULE | 48 | module_param(selfshrinking, bool, S_IRUGO); |
67 | module_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 | } |