From 54598d1b034624dc0817fca3f2c7fd914938b7c8 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Wed, 8 May 2013 16:44:06 -0400 Subject: xen/tmem: Remove the usage of 'noselfshrink' and use 'tmem.selfshrink' 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 --- drivers/xen/xen-selfballoon.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/xen/xen-selfballoon.c') diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index f2ef569c7cc..012f9d9bf5f 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c @@ -60,8 +60,8 @@ * be enabled with the "selfballooning" kernel boot option; similarly * selfballooning is enabled by default if frontswap is configured and * can be disabled with the "noselfballooning" kernel boot option. Finally, - * when frontswap is configured, frontswap-selfshrinking can be disabled - * with the "noselfshrink" kernel boot option. + * when frontswap is configured,frontswap-selfshrinking can be disabled + * with the "tmem.selfshrink=0" kernel boot option. * * Selfballooning is disallowed in domain0 and force-disabled. * @@ -120,9 +120,6 @@ static DECLARE_DELAYED_WORK(selfballoon_worker, selfballoon_process); /* Enable/disable with sysfs. */ static bool frontswap_selfshrinking __read_mostly; -/* Enable/disable with kernel boot option. */ -static bool use_frontswap_selfshrink = true; - /* * The default values for the following parameters were deemed reasonable * by experimentation, may be workload-dependent, and can all be @@ -176,14 +173,6 @@ static void frontswap_selfshrink(void) frontswap_shrink(tgt_frontswap_pages); } -static int __init xen_nofrontswap_selfshrink_setup(char *s) -{ - use_frontswap_selfshrink = false; - return 1; -} - -__setup("noselfshrink", xen_nofrontswap_selfshrink_setup); - /* Disable with kernel boot option. */ static bool use_selfballooning = true; -- cgit v1.2.3 From ed4f346a008edda8ee08ffcdc642691847636954 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Wed, 8 May 2013 16:52:38 -0400 Subject: 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 --- drivers/xen/xen-selfballoon.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'drivers/xen/xen-selfballoon.c') diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index 012f9d9bf5f..5d637e2b1b9 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c @@ -57,9 +57,9 @@ * configured, it is highly recommended that frontswap also be configured * and enabled when selfballooning is running. So, selfballooning * is disabled by default if frontswap is not configured and can only - * be enabled with the "selfballooning" kernel boot option; similarly + * be enabled with the "tmem.selfballooning=1" kernel boot option; similarly * selfballooning is enabled by default if frontswap is configured and - * can be disabled with the "noselfballooning" kernel boot option. Finally, + * can be disabled with the "tmem.selfballooning=0" kernel boot option. Finally, * when frontswap is configured,frontswap-selfshrinking can be disabled * with the "tmem.selfshrink=0" kernel boot option. * @@ -173,27 +173,6 @@ static void frontswap_selfshrink(void) frontswap_shrink(tgt_frontswap_pages); } -/* Disable with kernel boot option. */ -static bool use_selfballooning = true; - -static int __init xen_noselfballooning_setup(char *s) -{ - use_selfballooning = false; - return 1; -} - -__setup("noselfballooning", xen_noselfballooning_setup); -#else /* !CONFIG_FRONTSWAP */ -/* Enable with kernel boot option. */ -static bool use_selfballooning; - -static int __init xen_selfballooning_setup(char *s) -{ - use_selfballooning = true; - return 1; -} - -__setup("selfballooning", xen_selfballooning_setup); #endif /* CONFIG_FRONTSWAP */ #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) -- cgit v1.2.3 From 37d46e152e4c71cd772085912f1c7bf06839f739 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 14 May 2013 13:56:42 -0400 Subject: xen/tmem: Don't use self[ballooning|shrinking] if frontswap is off. There is no point. We would just squeeze the guest to put more and more pages in the swap disk without any purpose. The only time it makes sense to use the selfballooning and shrinking is when frontswap is being utilized. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/xen-selfballoon.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'drivers/xen/xen-selfballoon.c') diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index 5d637e2b1b9..f70984a892a 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c @@ -53,15 +53,12 @@ * System configuration note: Selfballooning should not be enabled on * systems without a sufficiently large swap device configured; for best * results, it is recommended that total swap be increased by the size - * of the guest memory. Also, while technically not required to be - * configured, it is highly recommended that frontswap also be configured - * and enabled when selfballooning is running. So, selfballooning - * is disabled by default if frontswap is not configured and can only - * be enabled with the "tmem.selfballooning=1" kernel boot option; similarly - * selfballooning is enabled by default if frontswap is configured and - * can be disabled with the "tmem.selfballooning=0" kernel boot option. Finally, - * when frontswap is configured,frontswap-selfshrinking can be disabled - * with the "tmem.selfshrink=0" kernel boot option. + * of the guest memory. Note, that selfballooning should be disabled by default + * if frontswap is not configured. Similarly selfballooning should be enabled + * by default if frontswap is configured and can be disabled with the + * "tmem.selfballooning=0" kernel boot option. Finally, when frontswap is + * configured, frontswap-selfshrinking can be disabled with the + * "tmem.selfshrink=0" kernel boot option. * * Selfballooning is disallowed in domain0 and force-disabled. * -- cgit v1.2.3