]> git.proxmox.com Git - qemu.git/commit
xen-mapcache: Fix rlimit set size.
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 9 Sep 2011 12:50:18 +0000 (12:50 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 9 Sep 2011 13:13:16 +0000 (13:13 +0000)
commit56c119e52ca229869912b22a5bec283487b0cf9b
tree13a7e2c05943a89401ba9c2012ded94726e8d969
parent2b734340407e9b9f70ba84bb596201ef7027a427
xen-mapcache: Fix rlimit set size.

Previously, the address space soft limit was set mcache_max_size. So,
before the mcache_max_size was reached by the mapcache, QEMU was killed
for overuse of the virtual address space.

This patch fix that by setting the soft limit the maximum than can have
QEMU. So the soft and hard limit are always set to RLIM_INFINITY if QEMU
is privileged.

In case QEMU is not run as root and the limit is too low, the maximum
mapcache size will be set the rlim_max - 80MB because observed that QEMU
use 75MB more than the maximum mapcache size after several empirical
tests.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen-mapcache.c