diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-08 16:52:38 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-15 10:27:49 -0400 |
commit | ed4f346a008edda8ee08ffcdc642691847636954 (patch) | |
tree | 6f29ccf05d235e4859000c57d737db3842591071 /drivers/xen | |
parent | 54598d1b034624dc0817fca3f2c7fd914938b7c8 (diff) |
xen/tmem: Remove the usage of '[no|]selfballoon' and use 'tmem.selfballooning' bool instead.
As the 'tmem' driver is the one that actually sets whether
it will use it (or not) so might as well make tmem responsible
for this knob.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/Kconfig | 5 | ||||
-rw-r--r-- | drivers/xen/xen-selfballoon.c | 25 |
2 files changed, 4 insertions, 26 deletions
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 98e9744e3359..9e02d60a364b 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig | |||
@@ -19,11 +19,10 @@ config XEN_SELFBALLOONING | |||
19 | by the current usage of anonymous memory ("committed AS") and | 19 | by the current usage of anonymous memory ("committed AS") and |
20 | controlled by various sysfs-settable parameters. Configuring | 20 | controlled by various sysfs-settable parameters. Configuring |
21 | FRONTSWAP is highly recommended; if it is not configured, self- | 21 | FRONTSWAP is highly recommended; if it is not configured, self- |
22 | ballooning is disabled by default but can be enabled with the | 22 | ballooning is disabled by default. If FRONTSWAP is configured, |
23 | 'selfballooning' kernel boot parameter. If FRONTSWAP is configured, | ||
24 | frontswap-selfshrinking is enabled by default but can be disabled | 23 | frontswap-selfshrinking is enabled by default but can be disabled |
25 | with the 'tmem.selfshrink=0' kernel boot parameter; and self-ballooning | 24 | with the 'tmem.selfshrink=0' kernel boot parameter; and self-ballooning |
26 | is enabled by default but can be disabled with the 'noselfballooning' | 25 | is enabled by default but can be disabled with the 'tmem.selfballooning=0' |
27 | kernel boot parameter. Note that systems without a sufficiently | 26 | kernel boot parameter. Note that systems without a sufficiently |
28 | large swap device should not enable self-ballooning. | 27 | large swap device should not enable self-ballooning. |
29 | 28 | ||
diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index 012f9d9bf5f4..5d637e2b1b9f 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c | |||
@@ -57,9 +57,9 @@ | |||
57 | * configured, it is highly recommended that frontswap also be configured | 57 | * configured, it is highly recommended that frontswap also be configured |
58 | * and enabled when selfballooning is running. So, selfballooning | 58 | * and enabled when selfballooning is running. So, selfballooning |
59 | * is disabled by default if frontswap is not configured and can only | 59 | * is disabled by default if frontswap is not configured and can only |
60 | * be enabled with the "selfballooning" kernel boot option; similarly | 60 | * be enabled with the "tmem.selfballooning=1" kernel boot option; similarly |
61 | * selfballooning is enabled by default if frontswap is configured and | 61 | * selfballooning is enabled by default if frontswap is configured and |
62 | * can be disabled with the "noselfballooning" kernel boot option. Finally, | 62 | * can be disabled with the "tmem.selfballooning=0" kernel boot option. Finally, |
63 | * when frontswap is configured,frontswap-selfshrinking can be disabled | 63 | * when frontswap is configured,frontswap-selfshrinking can be disabled |
64 | * with the "tmem.selfshrink=0" kernel boot option. | 64 | * with the "tmem.selfshrink=0" kernel boot option. |
65 | * | 65 | * |
@@ -173,27 +173,6 @@ static void frontswap_selfshrink(void) | |||
173 | frontswap_shrink(tgt_frontswap_pages); | 173 | frontswap_shrink(tgt_frontswap_pages); |
174 | } | 174 | } |
175 | 175 | ||
176 | /* Disable with kernel boot option. */ | ||
177 | static bool use_selfballooning = true; | ||
178 | |||
179 | static int __init xen_noselfballooning_setup(char *s) | ||
180 | { | ||
181 | use_selfballooning = false; | ||
182 | return 1; | ||
183 | } | ||
184 | |||
185 | __setup("noselfballooning", xen_noselfballooning_setup); | ||
186 | #else /* !CONFIG_FRONTSWAP */ | ||
187 | /* Enable with kernel boot option. */ | ||
188 | static bool use_selfballooning; | ||
189 | |||
190 | static int __init xen_selfballooning_setup(char *s) | ||
191 | { | ||
192 | use_selfballooning = true; | ||
193 | return 1; | ||
194 | } | ||
195 | |||
196 | __setup("selfballooning", xen_selfballooning_setup); | ||
197 | #endif /* CONFIG_FRONTSWAP */ | 176 | #endif /* CONFIG_FRONTSWAP */ |
198 | 177 | ||
199 | #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) | 178 | #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) |