diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 20 | ||||
-rw-r--r-- | drivers/xen/tmem.c | 28 |
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 |
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 | } |