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>
This commit is contained in:
Konrad Rzeszutek Wilk 2013-05-08 16:52:38 -04:00
parent 54598d1b03
commit ed4f346a00
2 changed files with 4 additions and 26 deletions

View File

@ -19,11 +19,10 @@ config XEN_SELFBALLOONING
by the current usage of anonymous memory ("committed AS") and by the current usage of anonymous memory ("committed AS") and
controlled by various sysfs-settable parameters. Configuring controlled by various sysfs-settable parameters. Configuring
FRONTSWAP is highly recommended; if it is not configured, self- FRONTSWAP is highly recommended; if it is not configured, self-
ballooning is disabled by default but can be enabled with the ballooning is disabled by default. If FRONTSWAP is configured,
'selfballooning' kernel boot parameter. If FRONTSWAP is configured,
frontswap-selfshrinking is enabled by default but can be disabled frontswap-selfshrinking is enabled by default but can be disabled
with the 'tmem.selfshrink=0' kernel boot parameter; and self-ballooning with the 'tmem.selfshrink=0' kernel boot parameter; and self-ballooning
is enabled by default but can be disabled with the 'noselfballooning' is enabled by default but can be disabled with the 'tmem.selfballooning=0'
kernel boot parameter. Note that systems without a sufficiently kernel boot parameter. Note that systems without a sufficiently
large swap device should not enable self-ballooning. large swap device should not enable self-ballooning.

View File

@ -57,9 +57,9 @@
* configured, it is highly recommended that frontswap also be configured * configured, it is highly recommended that frontswap also be configured
* and enabled when selfballooning is running. So, selfballooning * and enabled when selfballooning is running. So, selfballooning
* is disabled by default if frontswap is not configured and can only * 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 * 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 * when frontswap is configured,frontswap-selfshrinking can be disabled
* with the "tmem.selfshrink=0" kernel boot option. * with the "tmem.selfshrink=0" kernel boot option.
* *
@ -173,27 +173,6 @@ static void frontswap_selfshrink(void)
frontswap_shrink(tgt_frontswap_pages); 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 */ #endif /* CONFIG_FRONTSWAP */
#define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT))