From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJxyB-000511-TO for qemu-devel@nongnu.org; Tue, 28 Jul 2015 02:02:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJxy7-0002hT-Q1 for qemu-devel@nongnu.org; Tue, 28 Jul 2015 02:02:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJxy7-0002hM-K7 for qemu-devel@nongnu.org; Tue, 28 Jul 2015 02:02:27 -0400 Date: Tue, 28 Jul 2015 11:32:14 +0530 From: Amit Shah Message-ID: <20150728060214.GJ12267@grmbl.mre> References: <1434450415-11339-1-git-send-email-dgilbert@redhat.com> <1434450415-11339-42-git-send-email-dgilbert@redhat.com> <87zj2yepcq.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zj2yepcq.fsf@neno.neno> Subject: Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, liang.z.li@intel.com, "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org, luis@cs.umu.se, pbonzini@redhat.com, david@gibson.dropbear.id.au On (Tue) 14 Jul 2015 [17:22:13], Juan Quintela wrote: > "Dr. David Alan Gilbert (git)" wrote: > > + if (enable_mlock) { > > + if (os_mlock() < 0) { > > + error_report("mlock: %s", strerror(errno)); > > + /* > > + * It doesn't feel right to fail at this point, we have a valid > > + * VM state. > > + */ > > realtime_init() exit in case of os_mlock() fails, so current code is: Yea, I was wondering the same - but then I thought: would the realtime case want a migration to happen at all? > - we start qemu with mlock requset > - we mlock memory > - we start postcopy > - we munlock memory > - we mlock memory > > I wmill really, really preffer having a check if memory is mlocked, and > it that case, just abort migration altogether. Or better still, wait to > enable mlock *until* we have finished postcopy, no? Amit