]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: release lock occasionally during ballooning
authorJuergen Gross <jgross@suse.com>
Mon, 20 Jul 2015 11:49:39 +0000 (13:49 +0200)
committerElena Ufimtseva <elena.ufimtseva@oracle.com>
Wed, 12 Aug 2015 10:07:27 +0000 (06:07 -0400)
commit349edb44eceb3450a9439983d68385f9d9ea465e
tree7beb96af55aae1b24011c69e185d8bd7bf722a52
parent13fa38a0b6f3faf81d70e8b0e5e5c07160559b6b
xen: release lock occasionally during ballooning

When dom0 is being ballooned balloon_process() will hold the balloon
mutex until it is finished. This will block e.g. creation of new
domains as the device backends for the new domain need some
autoballooned pages for the ring buffers.

Avoid this by releasing the balloon mutex from time to time during
ballooning. Adjust the comment above balloon_process() regarding
multiple instances of balloon_process().

Instead of open coding it, just use cond_resched().

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 929423fa83e5b75e94101b280738b9a5a376a0e1)
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
drivers/xen/balloon.c