Files
acrn-hypervisor/devicemodel/core
Minggui Cao 0e49f85a25 improve memory allocation for UOS by hugeTLB mmap
check if there are enough free huge pages(1GB & 2MB now) for UOS,
if no, it will try to reserve more pages for UOS.

here are two examples
1. if system has free huge pages: 1 page of 1GB size, 0 page of 2MB.
one UOS need 2GB + 500MB memory, it will try to reserve one more 1GB
page and 250 2MB pages from system. If enough free system memory, it
can succeed.

2. if system has free huge pages: 4 pages of 1GB size, 0 page of 2MB.
one UOS need 2GB + 500MB, 1GB huge pages 4 > 2, it's enough, and 2 pages
left. It will try to reserve 250 2MB pages from system free memory,
if failed, it will try to release 1 of the 2 left 1GB pages. And then
try to reserve 250 2MB pages.

Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-21 17:01:23 +08:00
..
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00
2018-06-07 14:35:30 +08:00