From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751251AbdEaOTp (ORCPT ); Wed, 31 May 2017 10:19:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:39309 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751100AbdEaOTn (ORCPT ); Wed, 31 May 2017 10:19:43 -0400 Date: Wed, 31 May 2017 16:19:40 +0200 From: Michal Hocko To: Mike Rapoprt Cc: Andrea Arcangeli , Vlastimil Babka , "Kirill A. Shutemov" , Andrew Morton , Arnd Bergmann , "Kirill A. Shutemov" , Pavel Emelyanov , linux-mm , lkml , Linux API Subject: Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE Message-ID: <20170531141939.GP27783@dhcp22.suse.cz> References: <20170524111800.GD14733@dhcp22.suse.cz> <20170524142735.GF3063@rapoport-lnx> <20170530074408.GA7969@dhcp22.suse.cz> <20170530101921.GA25738@rapoport-lnx> <20170530103930.GB7969@dhcp22.suse.cz> <20170530140456.GA8412@redhat.com> <20170530143941.GK7969@dhcp22.suse.cz> <20170530154326.GB8412@redhat.com> <20170531120822.GL27783@dhcp22.suse.cz> <8FA5E4C2-D289-4AF5-AA09-6C199E58F9A5@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8FA5E4C2-D289-4AF5-AA09-6C199E58F9A5@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 31-05-17 15:39:22, Mike Rapoprt wrote: > > > On May 31, 2017 3:08:22 PM GMT+03:00, Michal Hocko 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