From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH 0/8] RFC: vcpu pinning at qemu start Date: Tue, 04 Mar 2008 16:59:04 -0300 Message-ID: <47CDAA08.3030006@redhat.com> References: <12046477213193-git-send-email-gcosta@redhat.com> <47CD8A02.50402@codemonkey.ws> <47CD907E.1080607@redhat.com> <47CDA2D8.7060709@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, chrisw@sous-sol.org, avi@qumranet.com To: Anthony Liguori Return-path: In-Reply-To: <47CDA2D8.7060709@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > Glauber Costa wrote: >> My main interest is in management tools being able to specify pinning >> set ups at VM creation time. >> >> As I said, it can be done through tools like taskset, but then you'd >> have to know: >> * when are the threads created >> * which thread ids corresponds to each cpu >> >> And of course, for an amount of time, the threads will be running in a >> "wrong" cpu, which may affect workloads running there. (which is a >> case cpu pinning usually tries to address) > > A management tool can start QEMU with -S to prevent any CPUs from > running, query the VCPU=>thread id relationship (modifying info cpus > would be a good thing to do for this), taskset, and then run 'cont' in > the monitor if they desperately need this functionality. However, I > don't think the vast majority of people need this particular functionality. No, it can't. Because at the time qemu starts, no vcpu -> thread id relationship exists at all. And we don't know when it will. It would be a different story if there were some kind of api that could warn qemu > My feeling is that adding an interface to do this in QEMU encourages > people to not use the existing Linux tools for this or worse yet, to > think they can do a better job than Linux. I agree with you that we should stick with linux tools, and that's why I didn't provide any kind of runtime setting via qemu monitor to do this (with the infrastructure, it would be trivial). taskset will do. > The whole reason this exists > in Xen is that Xen's schedulers were incapable of doing CPU migration > historically (which is no longer true since the credit scheduler). It > was necessary to specify pinning upon creation or you were stuck with > round-robin placement. So libvirt has APIs for this because they were > part of the Xen API because it was needed to get reasonable performance > at some point in time on Xen. I don't think this behavior is useful for > KVM though. Just because Xen does it doesn't imply that we should do it. No, not just because xen does. I do however feel it useful, since starting a vm and then let it run unchanged is definitely an useful use case. And as I tried to show you, I can't see a good way to do that for pinning. > Regards, > > Anthony Liguori > >> >> > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/