So was that knowledge always wrong? Does the Solaris kernel run on
all CPUs, or is it indeed limited to running on CPU 0?
That must be really *(^&^% old, because ever since Solaris 2.0 that's not
been true.
> Nowadays, when I look deep at a Solaris 10 x86 system, I'm not so sure I am
>seeing that any more. For example, we have an application that is extremely
>SYS heavy (unoptimized code) that calls time-related functions a lot, which
>eventually breaks down into a gtime() storm. Yet when the app is running, I
>don't see CPU0 go way up, only the CPU that the application is on.
That makes tons of sense.
>So was that knowledge always wrong?
Wrong, or at least way out of date. (Perhaps this was true on SunOS 4.x?!?
Not true on SunOS 5.x!)
> Does the Solaris kernel run on all CPUs, or is it indeed limited to running
> on CPU 0?
Oh it runs on all CPUs alright! Otherwise I wouldn't have to worry about any
race conditions, locking, interrupt-scattering (or lack thereof on, say,
inbound packets) or any of other such problems that one's kernel code has to
take into account.
Hope this helps!
--
Daniel L. McDonald - Solaris Security & Networking Engineering
Mail: dan...@sun.com | * MY OPINIONS ARE NOT NECESSARILY SUN'S! *
35 Network Drive Burlington, MA |"rising falling at force ten
http://blogs.sun.com/danmcd/ | we twist the world and ride the wind" - Rush
Dan McDonald wrote:
> In article <566e6314-288b-4c61...@a32g2000yqm.googlegroups.com>,
> Jim Leonard <moby...@gmail.com> wrote:
>> It was old unix knowledge I received a long long time ago that said
>> that the Solaris kernel ran only on CPU0.
>
> That must be really *(^&^% old, because ever since Solaris 2.0 that's not
> been true.
>
>> Nowadays, when I look deep at a Solaris 10 x86 system, I'm not so sure I am
>> seeing that any more. For example, we have an application that is extremely
>> SYS heavy (unoptimized code) that calls time-related functions a lot, which
>> eventually breaks down into a gtime() storm. Yet when the app is running, I
>> don't see CPU0 go way up, only the CPU that the application is on.
>
> That makes tons of sense.
>
>> So was that knowledge always wrong?
>
> Wrong, or at least way out of date. (Perhaps this was true on SunOS 4.x?!?
> Not true on SunOS 5.x!)
>
>> Does the Solaris kernel run on all CPUs, or is it indeed limited to running
>> on CPU 0?
>
> Oh it runs on all CPUs alright! Otherwise I wouldn't have to worry about any
> race conditions, locking, interrupt-scattering (or lack thereof on, say,
> inbound packets) or any of other such problems that one's kernel code has to
> take into account.
>
> Hope this helps!
What about IO IRQ, is that handled by one CPU or all?
/michael
> What about IO IRQ, is that handled by one CPU or all?
By all CPUs that are not marked "no-intr".
Have a look at the "psradm" command for a list of the states a Solaris
CPU can be in. The man page is quite informative.
--
Stefaan A Eeckels
--
People don't ask for facts in making up their minds. They would rather
have one good soul-satisfying emotion than a dozen facts.
--Leavitt
Hello!
>What about IO IRQ, is that handled by one CPU or all?
More than one --> man intrd for some implementation details.
> In article <566e6314-288b-4c61...@a32g2000yqm.googlegroups.com>,
> Jim Leonard <moby...@gmail.com> wrote:
>>It was old unix knowledge I received a long long time ago that said
>>that the Solaris kernel ran only on CPU0.
>
> That must be really *(^&^% old, because ever since Solaris 2.0 that's not
> been true.
>
>> Nowadays, when I look deep at a Solaris 10 x86 system, I'm not so sure I am
>>seeing that any more. For example, we have an application that is extremely
>>SYS heavy (unoptimized code) that calls time-related functions a lot, which
>>eventually breaks down into a gtime() storm. Yet when the app is running, I
>>don't see CPU0 go way up, only the CPU that the application is on.
>
> That makes tons of sense.
>
>>So was that knowledge always wrong?
>
> Wrong, or at least way out of date. (Perhaps this was true on SunOS 4.x?!?
> Not true on SunOS 5.x!)
>
>> Does the Solaris kernel run on all CPUs, or is it indeed limited to running
>> on CPU 0?
>
> Oh it runs on all CPUs alright! Otherwise I wouldn't have to worry about any
> race conditions, locking, interrupt-scattering (or lack thereof on, say,
> inbound packets) or any of other such problems that one's kernel code has to
> take into account.
The kernel was not multi threaded in SunOS 4.
On some workloads a 690MP would be faster with 2 instead of 4 cpus.
I don't think the kernel always ran on CPU 0 even in SunOS 4.1.2, it
ran of whichever cpu happend to trap into the kernel and grab the
single kernel lock that locked out all other cpu:s. from enetring the
kernel.
>
> Hope this helps!
Thomas
> So was that knowledge always wrong? Does the Solaris kernel run on
> all CPUs, or is it indeed limited to running on CPU 0?
SunOS 4 was bound to one CPU, SunOS 5 has always run on multiple CPUs
and residual serial behaviours have obviously largely been driven out
over time as it has to scale to machines with large numbers of
(virtual) processors. Amdahl's law means that an OS on a machine with
a large number of CPUs really needs to be able to run on many
processors itself.