From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNXZ5-0001nD-8t for qemu-devel@nongnu.org; Thu, 06 Aug 2015 22:39:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNXZ4-00025o-Ft for qemu-devel@nongnu.org; Thu, 06 Aug 2015 22:39:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNXZ4-00025j-Al for qemu-devel@nongnu.org; Thu, 06 Aug 2015 22:39:22 -0400 Date: Thu, 6 Aug 2015 15:55:07 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20150806145506.GG2251@work-vm> 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> <87egjstt47.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87egjstt47.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, zhang.zhanghailiang@huawei.com, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, Amit Shah , pbonzini@redhat.com, david@gibson.dropbear.id.au * Juan Quintela (quintela@redhat.com) wrote: > 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. I added this patch because Zhanghailiang had reported trying to use it and it failing. Zhanghailiang: Do you have a use case for mlock=on and migration? Dave > > > > >> - 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 -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK