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: Wed, 05 Mar 2008 10:10:23 -0300 Message-ID: <47CE9BBF.6090408@redhat.com> References: <12046477213193-git-send-email-gcosta@redhat.com> <47CD8A02.50402@codemonkey.ws> <47CD907E.1080607@redhat.com> <47CDA2D8.7060709@codemonkey.ws> <47CDAA08.3030006@redhat.com> <47CE16EC.8040603@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: <47CE16EC.8040603@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: >> Anthony Liguori wrote: >> >> 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. > > Sure we do. The vcpu -> thread id relationship is valid after > kvm_init_ap() is called which is after machine init but before the > select loop is entered for the first time. Therefore, if you start qemu > with -S, then connect on the monitor, and do an info cpus, you could be > guaranteed to be told the mapping. I missed that. This changes everything. I now completely agree with you. I'll post patches that expose the relationship, if it's better. > The threads are *idle* at this point so there's no harm if they were > started on the "wrong" CPU. You can now taskset to your hearts content > and then when you're happy with placement, you can issue a 'cont' so > that the VM actually starts running. I saw "wrong" because you can > still taskset the initial creation guaranteeing that the threads are > created on the right group of physical CPUs, you just can't specify the > exact mapping until you start interacting with the monitor. > > Regards, > > Anthony Liguori > >>> 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/