From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhvVf-00075D-Sj for qemu-devel@nongnu.org; Wed, 07 May 2014 02:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhvVW-0000to-SK for qemu-devel@nongnu.org; Wed, 07 May 2014 02:39:19 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:37507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhvVW-0000rh-Hs for qemu-devel@nongnu.org; Wed, 07 May 2014 02:39:10 -0400 Received: by mail-ee0-f45.google.com with SMTP id d49so341943eek.4 for ; Tue, 06 May 2014 23:39:04 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5369D504.2070101@redhat.com> Date: Wed, 07 May 2014 08:39:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <53693FA4.3000306@windriver.com> In-Reply-To: <53693FA4.3000306@windriver.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] virtio-serial-pci very expensive during live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Friesen , qemu-devel@nongnu.org Il 06/05/2014 22:01, Chris Friesen ha scritto: > > It seems like the main problem is that we loop over all the queues, > calling virtio_pci_set_host_notifier_internal() on each of them. That > in turn calls memory_region_add_eventfd(), which calls > memory_region_transaction_commit(), which scans over all the address > spaces, which seems to take the vast majority of the time. Yes, you can wrap the entire loop with memory_region_transaction_begin and memory_region_transaction_commit. Can you try that? Paolo