Re: MAP_POPULATE vs. MADV_HUGEPAGES

From: Michal Hocko
Date: Thu Mar 16 2017 - 11:02:02 EST


On Thu 16-03-17 16:56:34, Avi Kivity wrote:
> On 03/16/2017 04:48 PM, Michal Hocko wrote:
> >On Thu 16-03-17 15:26:54, Avi Kivity wrote:
[...]
> >>>What is the THP defrag mode
> >>>(/sys/kernel/mm/transparent_hugepage/defrag)?
> >>The default (always).
> >the default has changed since then because the THP faul latencies were
> >just too large. Currently we only allow madvised VMAs to go stall and
> >even then we try hard to back off sooner rather than later. See
> >444eb2a449ef ("mm: thp: set THP defrag by default to madvise and add a
> >stall-free defrag option") merged in 4.4
>
> I see, thanks. So the 4.4 behavior is better mostly due to not trying so
> hard.

Please note there were many other patches in the compaction code as
well.
--
Michal Hocko
SUSE Labs