]> xenbits.xensource.com Git - people/pauldu/mini-os.git/commit
mini-os: balloon up in case of oom
authorJuergen Gross <jgross@suse.com>
Fri, 5 Aug 2016 14:27:53 +0000 (16:27 +0200)
committerWei Liu <wei.liu2@citrix.com>
Thu, 11 Aug 2016 12:09:59 +0000 (13:09 +0100)
commitf0ceb3ecc93deacab6084b31a9e69f825e90c268
treef6d0fbbbcef43b0b4be9094f463190dda3834bf4
parent4433067b93b748f73df15532dd2ba32cdf357dad
mini-os: balloon up in case of oom

If a memory shortage is detected balloon up.

Be careful to always leave some pages free as ballooning up might need
some memory, too:

- new p2m frames
- page tables for addressing new p2m frame
- new frame for page allocation bitmap
- page table for addressing new page allocation bitmap frame
- page tables for addressing new 1:1 mapped frames

For the moment we only balloon up synchronously when memory shortage
is detected in allocation routines with irqs on.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
balloon.c
include/balloon.h
mm.c