From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Host/Guest SMP: Looking for answers Date: Tue, 24 Jul 2007 16:59:06 +0300 Message-ID: <46A605AA.8030809@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Peter Meier Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Peter Meier wrote: > Hello, > > I've heard that KVM-33 now supports SMP hosts and SMP guests, > which is cool. However I do have some newbie-level questions > about this one. > > - I assume this is implemented by using n threads for n CPUs/CPU > cores and letting the host OS schedule accordingly? Or does the > VM somehow automagically bind each of its virtual CPU threads > to one of the host CPUs/cores? > Every virtual cpu (vcpu) is mapped to a thread. The scheduler maps threads to cores. It's no different than running a normal multithreaded application. > - I'd be interested to learn how to actually use SMP ;-). What > options do I need to enable inside the guest kernel's menucon- > fig beyond the basic SMP one, specifically what SMP sub-archi- > tecture type? > Er, whichever you like. At present, NUMA won't buy you anything, but that will change one day. In general any smp-enabled kernel should work, and there's no reason to enable any fancy features. > - For that matter, which Processor Family option is appropriate > inside KVM? I've been using "Pentium III" so far. Should I be > using the family of the host system? > P3 is a good choice, and so is using the host system. I doubt it makes any measurable difference. > - How do I tell the VM to use multiple CPUs/cores? Some command > line arguments to qemu-system-x86_64, or another way? > Use the -smp N option as documented in the qemu help. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/