From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrRIu-00042v-Fz for qemu-devel@nongnu.org; Wed, 28 Oct 2015 10:02:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrRIo-00022U-Df for qemu-devel@nongnu.org; Wed, 28 Oct 2015 10:02:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrRIo-00022P-9M for qemu-devel@nongnu.org; Wed, 28 Oct 2015 10:02:10 -0400 From: Juan Quintela In-Reply-To: <1443515898-3594-52-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Tue, 29 Sep 2015 09:38:15 +0100") References: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> <1443515898-3594-52-git-send-email-dgilbert@redhat.com> Date: Wed, 28 Oct 2015 15:02:06 +0100 Message-ID: <87bnbj8529.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v8 51/54] Postcopy: Mark nohugepage before discard Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: aarcange@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, bharata@linux.vnet.ibm.com, amit.shah@redhat.com, pbonzini@redhat.com "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Prior to servicing userfault requests we must ensure we've not got > huge pages in the area that might include non-transferred memory, > since a hugepage could incorrectly mark the whole huge page as present. > > We mark the area as non-huge page (nhp) just before we perform > discards; the discard code now tells us to discard any areas > that haven't been sent (as well as any that are redirtied); > any already formed transparent-huge-pages get fragmented > by this discard process if they cotnain any discards. > > Transparent huge pages that have been entirely transferred > and don't contain any discards are not broken by this mechanism; > they stay as huge pages. > > By starting postcopy after a full precopy pass, many of the pages > then stay as huge pages; this is important for maintaining performance > after the end of the migration. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela