Skip to content

Commit 136d9eb

Browse files
committed
Merge branch 'xen-tmem-selfballoon-v8' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem into stable/drivers
* 'xen-tmem-selfballoon-v8' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem: xen: tmem: self-ballooning and frontswap-selfshrinking
2 parents 149bb2f + a50777c commit 136d9eb

6 files changed

Lines changed: 520 additions & 0 deletions

File tree

‎drivers/xen/Kconfig‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@ config XEN_BALLOON
99
the system to expand the domain's memory allocation, or alternatively
1010
return unneeded memory to the system.
1111

12+
config XEN_SELFBALLOONING
13+
bool "Dynamically self-balloon kernel memory to target"
14+
depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP
15+
default n
16+
help
17+
Self-ballooning dynamically balloons available kernel memory driven
18+
by the current usage of anonymous memory ("committed AS") and
19+
controlled by various sysfs-settable parameters. Configuring
20+
FRONTSWAP is highly recommended; if it is not configured, self-
21+
ballooning is disabled by default but can be enabled with the
22+
'selfballooning' kernel boot parameter. If FRONTSWAP is configured,
23+
frontswap-selfshrinking is enabled by default but can be disabled
24+
with the 'noselfshrink' kernel boot parameter; and self-ballooning
25+
is enabled by default but can be disabled with the 'noselfballooning'
26+
kernel boot parameter. Note that systems without a sufficiently
27+
large swap device should not enable self-ballooning.
28+
1229
config XEN_SCRUB_PAGES
1330
bool "Scrub pages before returning them to system"
1431
depends on XEN_BALLOON

‎drivers/xen/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ obj-$(CONFIG_BLOCK) += biomerge.o
88
obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o
99
obj-$(CONFIG_XEN_XENCOMM) += xencomm.o
1010
obj-$(CONFIG_XEN_BALLOON) += xen-balloon.o
11+
obj-$(CONFIG_XEN_SELFBALLOONING) += xen-selfballoon.o
1112
obj-$(CONFIG_XEN_DEV_EVTCHN) += xen-evtchn.o
1213
obj-$(CONFIG_XEN_GNTDEV) += xen-gntdev.o
1314
obj-$(CONFIG_XEN_GRANT_DEV_ALLOC) += xen-gntalloc.o

‎drivers/xen/xen-balloon.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ static int __init balloon_init(void)
9898

9999
register_balloon(&balloon_sysdev);
100100

101+
register_xen_selfballooning(&balloon_sysdev);
102+
101103
target_watch.callback = watch_target;
102104
xenstore_notifier.notifier_call = balloon_init_watcher;
103105

0 commit comments

Comments
 (0)