]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
drivers: xen: deaggressive selfballoon driver
authorBob Liu <lliubbo@gmail.com>
Wed, 22 Jan 2014 06:57:44 +0000 (14:57 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 31 Jan 2014 14:48:43 +0000 (09:48 -0500)
commitbc1b0df59e3fc4573f92bc1aab9652047a0aeaa7
tree53cc9ed64066763826df51f914556c9f88a2a864
parent08ece5bb2312b4510b161a6ef6682f37f4eac8a1
drivers: xen: deaggressive selfballoon driver

Current xen-selfballoon driver is too aggressive which may cause OOM be
triggered more often. Eg. this bug reported by James:
https://lkml.org/lkml/2013/11/21/158

There are two mainly reasons:
1) The original goal_page didn't consider some pages used by kernel space, like
slab pages and pages used by device drivers.

2) The balloon driver may not give back memory to guest OS fast enough when the
workload suddenly aquries a lot of physical memory.

In both cases, the guest OS will suffer from memory pressure and OOM may
be triggered.

The fix is make xen-selfballoon driver not that aggressive by adding extra 10%
of total ram pages to goal_page.
It's more valuable to keep the guest system reliable and response faster than
balloon out these 10% pages to XEN.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-selfballoon.c