From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfjer-0001CY-ER for qemu-devel@nongnu.org; Wed, 08 Apr 2015 02:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfjem-0006AQ-CG for qemu-devel@nongnu.org; Wed, 08 Apr 2015 02:40:17 -0400 Received: from mga09.intel.com ([134.134.136.24]:14688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfjel-0006AE-VT for qemu-devel@nongnu.org; Wed, 08 Apr 2015 02:40:12 -0400 Message-ID: <5524CCB5.7080102@linux.intel.com> Date: Wed, 08 Apr 2015 14:37:41 +0800 From: Xiao Guangrong MIME-Version: 1.0 References: <5524CC0E.8020208@linux.intel.com> In-Reply-To: <5524CC0E.8020208@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] kvm: fix slot flags sync between Qemu and KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Li, Wanpeng" , Marcelo Tosatti , "qemu-devel@nongnu.org" , kvm@vger.kernel.org On 04/08/2015 02:34 PM, 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 Sorry for the typo :( , this should be: Reported-by: Wanpeng Li