From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH] kvm: fix slot flags sync between Qemu and KVM Date: Thu, 09 Apr 2015 09:24:02 +0800 Message-ID: <5525D4B2.9060104@linux.intel.com> References: <5524CC0E.8020208@linux.intel.com> <55250714.1050400@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, "qemu-devel@nongnu.org" , "Li, Wanpeng" To: Paolo Bonzini Return-path: Received: from mga11.intel.com ([192.55.52.93]:35926 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754193AbbDIB0e (ORCPT ); Wed, 8 Apr 2015 21:26:34 -0400 In-Reply-To: <55250714.1050400@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/08/2015 06:46 PM, Paolo Bonzini wrote: > > > On 08/04/2015 08:34, Xiao Guangrong wrote: >> We noticed that KVM keeps tracking dirty for the memslots when >> live migration failed which causes bad performance due to huge >> page mapping disallowed for this kind of memslot >> >> It is caused by slot flags does not properly sync-ed between Qemu >> and KVM. Current code doing slot update depends on slot->flags >> which hopes to omit unnecessary ioctl. However, slot->flags only >> reflects the stauts of corresponding memory region, vmsave and >> live migration do dirty tracking which overset >> KVM_MEM_LOG_DIRTY_PAGES for the slot. That causes the slot status >> recorded in the flags does not exactly match the stauts in kernel. >> >> We fixed it by introducing slot->is_dirty_logging which indicates >> the dirty status in kernel so that it helps us to sync the status >> between userspace and kernel >> >> Wanpeng Li >> Signed-off-by: Xiao Guangrong > > Hi Xiao, > > the patch looks good. > > However, I am planning to remove s->migration_log completely from QEMU > 2.4 and have slot->flags also track the migration state. This has the > side effect of fixing this bug. I'll Cc you on the patches when I post > them (next week probably). Good to know it, look forward to your patches. Thank you, Paolo!