From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK37k-0000XY-NU for qemu-devel@nongnu.org; Tue, 28 Jul 2015 07:32:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK37j-0007wS-QK for qemu-devel@nongnu.org; Tue, 28 Jul 2015 07:32:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK37j-0007wB-LL for qemu-devel@nongnu.org; Tue, 28 Jul 2015 07:32:43 -0400 From: Juan Quintela In-Reply-To: <20150728060214.GJ12267@grmbl.mre> (Amit Shah's message of "Tue, 28 Jul 2015 11:32:14 +0530") References: <1434450415-11339-1-git-send-email-dgilbert@redhat.com> <1434450415-11339-42-git-send-email-dgilbert@redhat.com> <87zj2yepcq.fsf@neno.neno> <20150728060214.GJ12267@grmbl.mre> Date: Tue, 28 Jul 2015 13:32:40 +0200 Message-ID: <87egjstt47.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah 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 Amit Shah wrote: > 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? Then disable migration with realtime looks like saner. But that decission don't belong to this series. > >> - 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