qemu/include/hw
Denis V. Lunev e3816255bf balloon: add a feature bit to let Guest OS deflate balloon on oom
Excessive virtio_balloon inflation can cause invocation of OOM-killer,
when Linux is under severe memory pressure. Various mechanisms are
responsible for correct virtio_balloon memory management. Nevertheless it
is often the case that these control tools does not have enough time to
react on fast changing memory load. As a result OS runs out of memory and
invokes OOM-killer. The balancing of memory by use of the virtio balloon
should not cause the termination of processes while there are pages in the
balloon. Now there is no way for virtio balloon driver to free memory at
the last moment before some process get killed by OOM-killer.

This does not provide a security breach as balloon itself is running
inside Guest OS and is working in the cooperation with the host. Thus
some improvements from Guest side should be considered as normal.

To solve the problem, introduce a virtio_balloon callback which is
expected to be called from the oom notifier call chain in out_of_memory()
function. If virtio balloon could release some memory, it will make the
system return and retry the allocation that forced the out of memory
killer to run.

This behavior should be enabled if and only if appropriate feature bit
is set on the device. It is off by default.

This functionality was recently merged into vanilla Linux.

  commit 5a10b7dbf904bfe01bb9fcc6298f7df09eed77d5
  Author: Raushaniya Maksudova <rmaksudova@parallels.com>
  Date:   Mon Nov 10 09:36:29 2014 +1030

This patch adds respective control bits into QEMU. It introduces
deflate-on-oom option for balloon device which does the trick.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Raushaniya Maksudova <rmaksudova@parallels.com>
CC: Anthony Liguori <aliguori@amazon.com>
CC: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Acked-by: James Bottomley <JBottomley@Odin.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
2015-06-23 17:08:21 +02:00
..
acpi ACPI: Add definitions for the SPCR table 2015-06-15 18:06:11 +01:00
arm arm: xlnx-zynqmp: Add 2xCortexR5 CPUs 2015-06-19 14:17:45 +01:00
audio
block
char char: cadence_uart: Split state struct and type into header 2015-05-18 16:41:12 +01:00
cpu
cris
i2c
i386 ich9: implement SMI_LOCK 2015-06-05 19:45:13 +02:00
input
intc hw/intc/arm_gic: Make ICCICR/GICC_CTLR banked 2015-05-12 11:57:17 +01:00
ipack
isa
kvm
lm32
m68k
mem
mips net/dp8393x: QOM'ify 2015-06-11 10:13:30 +01:00
misc stm32f2xx_SYSCFG: Add the stm32f2xx SYSCFG 2015-03-11 13:21:05 +00:00
net net: cadence_gem: Split state struct and type into header 2015-05-18 16:41:11 +01:00
nvram fw_cfg: remove support for guest-side data writes 2015-06-10 08:00:37 +02:00
pci pc, acpi, virtio 2015-06-11 15:33:38 +01:00
pci-host q35: implement TSEG 2015-06-05 19:45:13 +02:00
ppc -----BEGIN PGP SIGNATURE----- 2015-06-08 14:07:32 +01:00
s390x virtio-ccw: introduce ccw specific queue limit 2015-05-31 16:45:38 +02:00
scsi
sh4
sparc
timer
tricore
unicore32
usb
vfio hw/vfio/platform: calxeda xgmac device 2015-06-09 08:17:17 -06:00
virtio balloon: add a feature bit to let Guest OS deflate balloon on oom 2015-06-23 17:08:21 +02:00
watchdog s390x/watchdog: introduce diag288 watchdog device 2015-06-11 17:45:49 +02:00
xen
boards.h machine: add default_ram_size to machine class 2015-06-03 23:56:55 +02:00
bt.h
compat.h hw: Define empty HW_COMPAT_2_[23] macros 2015-05-31 16:26:41 +02:00
devices.h
elf_ops.h elf-loader: Add missing error handling for call of lseek 2015-03-19 11:37:40 +03:00
empty_slot.h
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader.h acpi-build: remove dependency from ram_addr.h 2015-04-27 18:24:18 +02:00
nmi.h nmi: Implement inject_nmi() for non-monitor context use 2015-06-11 17:45:50 +02:00
pcmcia.h
platform-bus.h
ptimer.h
qdev-core.h qdev: Un-deprecate qdev_init_nofail() 2015-06-19 19:14:32 +02:00
qdev-dma.h
qdev-properties.h qdev: add 64bit properties 2015-06-01 14:18:55 +02:00
qdev.h
sd.h
ssi.h
stream.h
sysbus.h
usb.h usb: Remove unused functions 2015-04-30 16:05:48 +03:00