aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--Documentation/kernel-parameters.txt20
-rw-r--r--drivers/xen/tmem.c28
2 files changed, 24 insertions, 24 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index c3bfacb92910..3de01edca3ea 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3005,6 +3005,26 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3005 Force threading of all interrupt handlers except those 3005 Force threading of all interrupt handlers except those
3006 marked explicitly IRQF_NO_THREAD. 3006 marked explicitly IRQF_NO_THREAD.
3007 3007
3008 tmem [KNL,XEN]
3009 Enable the Transcendent memory driver if built-in.
3010
3011 tmem.cleancache=0|1 [KNL, XEN]
3012 Default is on (1). Disable the usage of the cleancache
3013 API to send anonymous pages to the hypervisor.
3014
3015 tmem.frontswap=0|1 [KNL, XEN]
3016 Default is on (1). Disable the usage of the frontswap
3017 API to send swap pages to the hypervisor.
3018
3019 tmem.selfballooning=0|1 [KNL, XEN]
3020 Default is on (1). Disable the driving of swap pages
3021 to the hypervisor.
3022
3023 tmem.selfshrinking=0|1 [KNL, XEN]
3024 Default is on (1). Partial swapoff that immediately
3025 transfers pages from Xen hypervisor back to the
3026 kernel based on different criteria.
3027
3008 topology= [S390] 3028 topology= [S390]
3009 Format: {off | on} 3029 Format: {off | on}
3010 Specify if the kernel should make use of the cpu 3030 Specify if the kernel should make use of the cpu
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}