From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXaRI-0006Ts-GC for qemu-devel@nongnu.org; Wed, 01 May 2013 13:03:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXaRH-0000f5-H2 for qemu-devel@nongnu.org; Wed, 01 May 2013 13:03:32 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:42375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXaRH-0000dQ-Ae for qemu-devel@nongnu.org; Wed, 01 May 2013 13:03:31 -0400 Received: by mail-ee0-f50.google.com with SMTP id b15so760366eek.9 for ; Wed, 01 May 2013 10:03:30 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51814AD5.10808@redhat.com> Date: Wed, 01 May 2013 19:03:17 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1367410972-22972-1-git-send-email-chegu_vinod@hp.com> <51810CC0.2080407@redhat.com> <51810F9D.3000605@hp.com> <1062403018.4755871.1367422845697.JavaMail.root@redhat.com> <5181440D.7060006@hp.com> In-Reply-To: <5181440D.7060006@hp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3] Throttle-down guest when live migration does not converge. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chegu Vinod Cc: owasserm@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, quintela@redhat.com Il 01/05/2013 18:34, Chegu Vinod ha scritto: > On 5/1/2013 8:40 AM, Paolo Bonzini wrote: >>> I shall make the suggested changes. >>> Appreciate your review feedback on this part of the change. > Hi Paolo., > > Thanks for taking a look (BTW, I accidentally left out the "RFC" in the > patch subject line...my bad!). >> Hi Vinod, >> >> I think unfortunately it is not acceptable to make this patch work only >> for KVM. (It cannot work for Xen, but that's not a problem since Xen >> uses a different migration mechanism; but it should work for TCG). > > Ok. I hadn't yet looked at TCG aspects etc. Will follow up offline... If we do it right with run_on_cpu, it should just work with TCG. >> Unfortunately, as you noted the run_on_cpu callbacks currently run >> under the big QEMU lock. We need to fix that first. We have time >> for that during 1.6. > > Ok. Was under the impression that anytime a vcpu thread enters to do > anything in qemu the BQL had to be held. So choose to go with > run_on_cpu() . Will follow up offline on alternatives run_on_cpu() is fine, but the problem is: 1) that run_on_cpu() is synchronous, so the migration thread is paused too; 2) doing the usleep directly in kvm_cpu_exec. > "Holding" the vcpus in the host context (i.e. kvm module) itself is > perhaps another way. Would need some handshakes (i.e. new ioctls ) with > the kernel. Would that be acceptable way to proceed? No, I think it's better to make the wait in userspace. KVM could help finding the CPUs to be stunned, since it is where the dirty bits are computed. Paolo