Subject: Re: scheduler woes on MPACPI kernel
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Johnny Billquist <bqt@Update.UU.SE>
List: current-users
Date: 01/18/2005 23:13:25
On Tue, 18 Jan 2005, Manuel Bouyer wrote:

> On Tue, Jan 18, 2005 at 10:53:26PM +0100, Johnny Billquist wrote:
>> On Tue, 18 Jan 2005, Manuel Bouyer wrote:
>>
>>> On Tue, Jan 18, 2005 at 05:09:48PM +0200, Teemu Rinta-aho wrote:
>>>> Does anyone know if there has been any analysis on the
>>>> effect of P4 hyperthreading and MP support of NetBSD,
>>>> compared to a UP kernel?
>>>
>>> I tested with a make -j4 kernel build. A few % improvements with a MP
>>> kernel.
>>> But this is because we have a big kernel lock I think. On linux 2.6, which
>>> has finer-grained locking, a MP kernel increased the build time instead of
>>> decreasing it.
>>
>> Huh? I didn't understand this...
>> Are you claiming that a finer grained lock will decrease performance? Or
>> is there a serious bug in the Linux kernel?
>
> It decrease performances for this type of workload, on hyperthreaded
> single-CPU systems. This isn't surprising: finer grained lock cost more
> CPU time, without giving much more concurency as a hyperthreaded CPU
> can't do that much things in parallel.
> On real multi-CPU systems things are probably different.

Okay. Fair enough.
But why shouldn't a hyperthreaded cpu be able to that much in parallel. 
It's been a few years since I last studied computer architectures, so I'm 
probably a bit rusty. But isn't a hyperthreaded cpu actually two cpu 
cores, but they share the bus interface, caches, and everything else 
outside the actual cpu core (by which I mean alu and registers). That 
should still be able to yield some parallelism, except if memory is a real 
bottleneck?

 	Johnny

Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol