Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE

Michal Hocko
2017-05-31T14:19:44Z

On Wed 31-05-17 15:39:22, Mike Rapoprt wrote:
>
>
> On May 31, 2017 3:08:22 PM GMT+03:00, Michal Hocko <mhocko@kernel.org> wrote:
[...]
> > From what Mike said a global disable THP for the whole process
> >while the post-copy is in progress is a better solution anyway.
>
> For the CRIU usecase, disabling THP for a while and re-enabling
> it back will do the trick, provided VMAs flags are not affected,
> like in the patch you've sent. Moreover, we may even get away with
> ioctl(UFFDIO_COPY) if it's overhead shows to be negligible. Still,
> I believe that MADV_RESET_HUGEPAGE (or some better named) command has
> the value on its own.

I would prefer if we could go the prctl if possible and add a new
MADV_RESET_HUGEPAGE if there is really a usecase for it.
--
Michal Hocko
SUSE Labs