From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48666 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7ZY5-0003LE-MC for qemu-devel@nongnu.org; Wed, 06 Apr 2011 16:41:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7ZY4-0001tA-22 for qemu-devel@nongnu.org; Wed, 06 Apr 2011 16:41:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7ZY3-0001sk-LM for qemu-devel@nongnu.org; Wed, 06 Apr 2011 16:41:55 -0400 Date: Wed, 6 Apr 2011 23:41:35 +0300 From: "Michael S. Tsirkin" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH RFC 0/5] kvm/vhost: enable durty logging during memory registration List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Currently, vga cards that allocate vga ram, register it as regular ram, and then request dirty logging from kvm (which is required for this hack to function correctly). Both these operations involve memory slot update and flush in kvm and in vhost which is a slow operation. This was observed to slow down windows guests with a huge amount of memory and cpu and with cirrus vga. As a solution, this adds an explicit flag that will enable dirty logging directly when registering the ram. kvm then needs a single system call to update tables for vga ram, vhost-net can simply ignore it. This patchset only updates the cirrus vga lfb vram mapping. Follow-up patchsets will update all the rest of the cards and then remove vga_dirty_log_xxx completely. This replaces the RFC patchset 'vga: flag vga ram for notifiers'. Warning: compile-tested only. Michael S. Tsirkin (5): cpu: add set_memory flag to request dirty logging kvm: halve number of set memory calls for vga vhost: skip memory which needs dirty logging vhost: optimize out no-change assignment cirrus_vga: flag on-device ram for dirty logging cpu-common.h | 22 +++++++++++++++---- exec.c | 14 +++++++----- hw/cirrus_vga.c | 16 +++++++++---- hw/vhost.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++- kvm-all.c | 62 +++++++++++++++++++++++++++++++++--------------------- 5 files changed, 134 insertions(+), 41 deletions(-) -- 1.7.3.2.91.g446ac