From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [RFC] allow multi-core guests: introduce cores= option to -cpu Date: Sun, 5 Jul 2009 18:04:07 +0300 Message-ID: <20090705150407.GK881@redhat.com> References: <1246632116-31366-1-git-send-email-andre.przywara@amd.com> <4A4F745C.8010001@redhat.com> <4A50BE5D.5010005@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Graf , Andre Przywara , anthony@codemonkey.ws, qemu-devel@nongnu.org, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37734 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752557AbZGEPEM (ORCPT ); Sun, 5 Jul 2009 11:04:12 -0400 Content-Disposition: inline In-Reply-To: <4A50BE5D.5010005@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Jul 05, 2009 at 05:53:17PM +0300, Avi Kivity wrote: > On 07/05/2009 04:23 PM, Alexander Graf wrote: >>> I thought of using -smp [processors=]2,cores=4,threads=2 (for a total >>> of 16 threads), but I think it makes more sense with -cpu. >> >> >> I actually think putting this in -smp makes more sense. -cpu really >> shouldn't need to be touched by normal users and as long as you can >> either -cpu host or -cpu safe that should be enough. > > Maybe. But in that case -cpu core2duo should imply cores=2 and -smp 2 > -cpu core2duo will bring up 4 cores spread across two sockets. > core2duo does not imply 2 cores. OSes use cpuid to discover this information. >> But then again maybe we should replace -smp with something more useful >> like -numa where you'd then specify #CPUs, #cores, mem-cpu connection, >> etc. > > I'd prefer -numa to specify the memory topology (and connections of > sockets to memory nodes), and -smp or -cpu to specify the intra-socket > topology. > I agree. -numa is a different story. It is possible to have zillion socket setup without numa at all. -- Gleb.