On 3/25/19 11:37 AM, Michael S. Tsirkin wrote: > 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? Yes. > So THP is 2M and MAX_ORDER is 8M. > MAX_ORDER - 3 ==> 1M. > Seems to work out. > > -- Regards Nitesh