Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Ceri Davies
On Mon, Jan 27, 2003 at 11:33:02PM -0500, Adam Migus wrote:
 Hi,
 I'm doing some performance analysis on FreeBSD.  I would like to
 be able to make an SMP kernel use only one CPU.  Of course I
 realize running GENERIC would only use 1 CPU but the concern is
 that the overhead assoicated with SMP will skew the statistics. 
 So my question is what would be the 'best' way to make an SMP
 kernel only start/use CPU0?

Yank the others ?

Ceri
-- 
Happiness is having a scratch for every itch.
-- Ogden Nash

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Odhiambo Washington
* Ceri Davies [EMAIL PROTECTED] [20030128 12:50]: wrote:
 On Mon, Jan 27, 2003 at 11:33:02PM -0500, Adam Migus wrote:
  Hi,
  I'm doing some performance analysis on FreeBSD.  I would like to
  be able to make an SMP kernel use only one CPU.  Of course I
  realize running GENERIC would only use 1 CPU but the concern is
  that the overhead assoicated with SMP will skew the statistics. 
  So my question is what would be the 'best' way to make an SMP
  kernel only start/use CPU0?
 
 Yank the others ?
 

What about building two kernels, one SMP, the other non-SMP, then
just boot wheichever kernel you want? Doesn't it server same purpose?
Better than Ceri's idea ;)


-Wash

-- 
Odhiambo Washington   [EMAIL PROTECTED]  The box said 'Requires
Wananchi Online Ltd.  www.wananchi.com  Windows 95, NT, or better,'
Tel: +254 2 313985-9  +254 2 313922 so I installed FreeBSD.   
GSM: +254 72 743223   +254 733 744121   This sig is McQ!  :-)


I'd love to go out with you, but I'm converting my calendar watch from
Julian to Gregorian.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread leafy
On Tue, Jan 28, 2003 at 12:53:49PM +0300, Odhiambo Washington wrote:
   that the overhead assoicated with SMP will skew the statistics. 
   So my question is what would be the 'best' way to make an SMP
   kernel only start/use CPU0?
  
  Yank the others ?
  
 
 What about building two kernels, one SMP, the other non-SMP, then
 just boot wheichever kernel you want? Doesn't it server same purpose?
 Better than Ceri's idea ;)
 
 
 -Wash
Unless I read him wrong, but I think he wants a SMP kernel to run on a single CPU. 
Besides pulling the thing out of the box, is it possible to disable one of them via 
BIOS?

Jiawei Ye  

-- 
Without the userland, the kernel is useless.
 --inspired by The Tao of Programming

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Juli Mallett
* De: Odhiambo Washington [EMAIL PROTECTED] [ Data: 2003-01-28 ]
[ Subjecte: Re: Force 1 CPU on SMP kernel? ]
 * Ceri Davies [EMAIL PROTECTED] [20030128 12:50]: wrote:
  On Mon, Jan 27, 2003 at 11:33:02PM -0500, Adam Migus wrote:
   Hi,
   I'm doing some performance analysis on FreeBSD.  I would like to
   be able to make an SMP kernel use only one CPU.  Of course I
   realize running GENERIC would only use 1 CPU but the concern is
   that the overhead assoicated with SMP will skew the statistics. 
   So my question is what would be the 'best' way to make an SMP
   kernel only start/use CPU0?
  
  Yank the others ?
  
 
 What about building two kernels, one SMP, the other non-SMP, then
 just boot wheichever kernel you want? Doesn't it server same purpose?
 Better than Ceri's idea ;)

You're missing the point.  He wants to boot only the bootstrap processor,
none of the APs, but still be running an SMP kernel.  I think checking how
much overhead SMP and APIC_IO add is a noble goal, and throwing real
SMP into the mix would be dumb.
-- 
Juli Mallett [EMAIL PROTECTED]
AIM: BSDFlata -- IRC: juli on EFnet
OpenDarwin, Mono, FreeBSD Developer
ircd-hybrid Developer, EFnet addict
FreeBSD on MIPS-Anything on FreeBSD

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Adam Migus

quote who=Juli Mallett
 * De: Odhiambo Washington [EMAIL PROTECTED] [ Data:
 2003-01-28 ]
   [ Subjecte: Re: Force 1 CPU on SMP kernel? ]
 * Ceri Davies [EMAIL PROTECTED] [20030128 12:50]:
 wrote:
  On Mon, Jan 27, 2003 at 11:33:02PM -0500, Adam Migus
 wrote:
   Hi,
   I'm doing some performance analysis on FreeBSD.  I would
 like to be able to make an SMP kernel use only one CPU.
 Of course I realize running GENERIC would only use 1 CPU
 but the concern is that the overhead assoicated with SMP
 will skew the statistics.  So my question is what would
 be the 'best' way to make an SMP kernel only start/use
 CPU0?
 
  Yank the others ?
 

 What about building two kernels, one SMP, the other non-SMP,
 then just boot wheichever kernel you want? Doesn't it server
 same purpose? Better than Ceri's idea ;)

 You're missing the point.  He wants to boot only the bootstrap
 processor, none of the APs, but still be running an SMP
 kernel.  I think checking how much overhead SMP and
 APIC_IO add is a noble goal, and throwing real SMP into the
 mix would be dumb.

Yes, just to be more explicit.  What I want to do is get the
'real' difference a second processor makes.  ie. If I run
GENERIC I'm not incurring the overhead associated with SMP/APIC.
 I want to use the same kernel making as small a change as
nessessary to have the machine start/use just one CPU.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Andre Guibert de Bruet


On Tue, 28 Jan 2003, Adam Migus wrote:

 Yes, just to be more explicit.  What I want to do is get the
 'real' difference a second processor makes.  ie. If I run
 GENERIC I'm not incurring the overhead associated with SMP/APIC.
  I want to use the same kernel making as small a change as
 nessessary to have the machine start/use just one CPU.

I'm not aware of any hacks to disable APs through loader.conf. If you're
trying to benchmark the system's performance with 1 vs N CPUs, you're best
off pulling all but the BSP CPU out of the machine. For such a benchmark
to be accurate, you shouldn't make any software changes (kernel, daemons
or startup configs).

Regards,

 Andre Guibert de Bruet | Enterprise Software Consultant 
 Silicon Landmark, LLC. | http://siliconlandmark.com/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Craig Rodrigues
Hi,

Does FreeBSD-SMP have anything equivalent to the processor_bind(2) call
on Solaris, which binds a process to a specific processor?

http://docs.sun.com/db/doc/816-0212/6m6nd4nci?a=view

-- 
Craig Rodrigues
http://home.attbi.com/~rodrigc
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Wilko Bulte
On Tue, Jan 28, 2003 at 12:33:32PM -0500, Andre Guibert de Bruet wrote:
 
 
 On Tue, 28 Jan 2003, Adam Migus wrote:
 
  Yes, just to be more explicit.  What I want to do is get the
  'real' difference a second processor makes.  ie. If I run
  GENERIC I'm not incurring the overhead associated with SMP/APIC.
   I want to use the same kernel making as small a change as
  nessessary to have the machine start/use just one CPU.
 
 I'm not aware of any hacks to disable APs through loader.conf. If you're
 trying to benchmark the system's performance with 1 vs N CPUs, you're best
 off pulling all but the BSP CPU out of the machine. For such a benchmark
 to be accurate, you shouldn't make any software changes (kernel, daemons
 or startup configs).

VOlunteers to implement psradm maybe?

W/

-- 
|   / o / /_  _ [EMAIL PROTECTED]
|/|/ / / /(  (_)  Bulte 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Force 1 CPU on SMP kernel?

2003-01-28 Thread Adam Migus
quote who=Andre Guibert de Bruet


 On Tue, 28 Jan 2003, Adam Migus wrote:

 Yes, just to be more explicit.  What I want to do is get
 the
 'real' difference a second processor makes.  ie. If I run
 GENERIC I'm not incurring the overhead associated with
 SMP/APIC.
  I want to use the same kernel making as small a change as
 nessessary to have the machine start/use just one CPU.

 I'm not aware of any hacks to disable APs through
 loader.conf.
 If you're trying to benchmark the system's performance with
 1
 vs N CPUs, you're best off pulling all but the BSP CPU out
 of
 the machine. For such a benchmark to be accurate, you
 shouldn't make any software changes (kernel, daemons or
 startup configs).

I tend to agree but things like warrenties and flakey boards
preclude removal of CPU(s).  All the same I think the ability
to turn on/off AP's at boot would be useful in general.

-- 
Adam Migus - Research Scientist
Network Associates Laboratories (http://www.nailabs.com)
TrustedBSD (http://www.trustedbsd.org)
FreeBSD (http://www.freebsd.org)




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message