Subject: Re: SMP and Xen
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Sarton O'Brien <bsd-xen@roguewrt.org>
List: port-xen
Date: 01/03/2007 10:56:18
On Wednesday 03 January 2007 10:28, Steven M. Bellovin wrote:
> > shutdown -hp does not actually shutdown but -r works fine :)
>
> Occasionally, it's worked for me; more often, it doesn't.  But
> 'xm destroy' at the right time works...

Sorry, I meant dom0. Both commands work fine for me under a domu.

> I now have a nice dump image -- create/label/newfs a new vnd disk, then
> do a restore and edit about two lines in rc.conf... and one line in the
> config file...

That's definitely the right idea. I've meant to do the same but I'm finding 
the inclusion of swap in the image disklabel a pain, mainly when it comes to 
resizing.

> > > Second -- should my Dom0 see both CPUs?  Currently, it does not.
> >
> > Is this nr_cpus when issuing an 'xm info' ?

Does nr_cp report 2? I'm assuming it does.

> Right.  xentop claims that the Dom0 and the (properly configured) DomU
> have 2 vcpus.  However, running 'top' or 'sysctl hw.ncpu' shows only 1.

That's normal. Dom0 suffers from similar constraints that a domu does.

I have a feeling that the vcpus section under xentop is misleading. If you 
perform 'xm list', you'll see that dom0 reports vcpus as 1.

> > My understanding is that it won't run on more than one cpu
> > (netbsd/xen). You can force allocation to a particular cpu or allow
> > it to dynamically allocate. I've not needed the dedication of a CPU
> > but I can see where this may come in handy.
>
> I have no need to force it, but it would be nice if my build machine
> were able to use both CPUs simultaneously.

It will, just not under the same xen domain ... I think linux can do this but 
I haven't played. Even with it's immaturity, I still think it out-performs 
linux xen, at least as far as vnd goes.

I do agree that 2 available CPUs makes a big difference when compiling. That's 
where having the generic mp acpi kernel in grub comes in handy :) ... but 
obviously that is only valid for a box that is physically accessible :(

I believe support is planned. I've not heard anything from Manuel for quite 
some time as to how active development is at this stage.

Sarton