Il 26/02/2014 13:58, Marcelo Tosatti ha scritto:
I'd prefer to keep backends simple, with 1:1 mapping to memory regions.
I agree. However not all backends may have a mapping to a RAM
memory region. A composite backend could create a container memory
region whose children are other HostMemoryBackend objects.
Is there a need in composite one or something similar?
I've heard of users that want a node backed partially by hugetlbfs
and partially by regular RAM. Not sure why.
To overcommit the non hugetlbfs backed guest RAM (think guest pagecache on that
non
hugetlbfs backed memory, swappable and KSM-able).
The problem is, you have to in someway guarantee the guest allocates
1GB pages out of the hugetlb backed GPA ranges. Some thoughts
(honestly, dislike all of them):
1) Boot guest with hugepages, allocate hugepages in guest,
later on hotplug 4K backed ranges. HV-unaware reboot might fail,
though.
2) Communicate hugepage GPAs to guest.
3) Create holes in non hugepage backed GPA range.
I guess (2) is the only one I "like", and I like it just because it
officially becomes Not Our Problem.
Paolo