Re: [RFC][Patch v9 0/6] KVM: Guest Free Page Hinting

From: Michael S. Tsirkin
Date: Mon Mar 25 2019 - 11:37:28 EST


On Mon, Mar 25, 2019 at 10:27:46AM -0400, Nitesh Narayan Lal wrote:
> I performed some experiments to see if the current implementation of
> hinting breaks THP. I used AnonHugePages to track the THP pages
> currently in use and memhog as the guest workload.
> Setup:
> Host Size: 30GB (No swap)
> Guest Size: 15GB
> THP Size: 2MB
> Process: Guest is installed with different kernels to hint different
> granularities(MAX_ORDER - 1, MAX_ORDER - 2 and MAX_ORDER - 3). Memhog 
> 15G is run multiple times in the same guest to see AnonHugePages usage
> in the host.
>
> Observation:
> There is no THP split for order MAX_ORDER - 1 & MAX_ORDER - 2 whereas
> for hinting granularity MAX_ORDER - 3 THP does split irrespective of
> MADVISE_FREE or MADVISE_DONTNEED.
> --
> Regards
> Nitesh
>

This is on x86 right? So THP is 2M and MAX_ORDER is 8M.
MAX_ORDER - 3 ==> 1M.
Seems to work out.

--
MST