From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuBfD-0004TF-DC for qemu-devel@nongnu.org; Wed, 04 Nov 2015 22:56:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuBf9-0004q8-D9 for qemu-devel@nongnu.org; Wed, 04 Nov 2015 22:56:39 -0500 Received: from mga02.intel.com ([134.134.136.20]:49823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuBf9-0004q3-7M for qemu-devel@nongnu.org; Wed, 04 Nov 2015 22:56:35 -0500 From: Liang Li Date: Thu, 5 Nov 2015 11:51:02 +0800 Message-Id: <1446695464-27116-1-git-send-email-liang.z.li@intel.com> Subject: [Qemu-devel] [v2 0/2] Optimize the env->tsc update operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Liang Li , ehabkost@redhat.com, mst@redhat.com, mtosatti@redhat.com, quintela@redhat.com, m.gibula@beyond.pl, amit.shah@redhat.com, pbonzini@redhat.com, rth@twiddle.net This patch set aims for reducing the live migration downtime. It updates the env->tsc when stopping kvmclock with a new function. Rather than using 'cpu_synchronize_all_states()', which updates the whole CPU context just for updating the env->tsc. For a VM with 4 CPUs, this patch set can help to reduce the VM downtime about 100us. Changes in v2: * Simplify 'kvm_get_tsc()' function. * Introduce a new function 'kvm_synchronize_all_tsc()' Liang Li (2): kvmclock: add a new function to update env->tsc. Revert "Introduce cpu_clean_all_dirty" cpus.c | 9 --------- hw/i386/kvm/clock.c | 18 ++---------------- include/sysemu/cpus.h | 1 - include/sysemu/kvm.h | 8 -------- kvm-all.c | 5 ----- target-i386/kvm.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ target-i386/kvm_i386.h | 1 + 7 files changed, 48 insertions(+), 39 deletions(-) -- 1.9.1