2007-01-12 13:25:35

by Sunil Naidu

[permalink] [raw]
Subject: Choosing a HyperThreading/SMP/MultiCore kernel ?

Hello All,

There are 2 cases:-

#1 Intel Pentium 4 Workstation with HyperThreading

Since kernel takes HT as 2 processors, I did say in KConfig as:

CONFIG_SMP= y
CONFIG_NR_CPUS=2
CONFIG_SCHED_MC=not set
CONFIG_MPENTIUM4=y (Or should I say CONFIG_X86_PC=y)
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=not set
RESOURCES_64BIT=not set
HOTPLUG_CPU=not set


Pl correct me if am wrong.


#2 Intel Core2Duo Processor - Laptop

CONFIG_SMP= y
CONFIG_NR_CPUS=4 ??
CONFIG_SCHED_MC=y
CONFIG_X86_PC=y ? (if wrong, what should I set for Xeon QuadCore)
CONFIG_SCHED_SMT=not set
CONFIG_SCHED_MC=y
RESOURCES_64BIT=not set
HOTPLUG_CPU=not set

I didn't start this yet (still with Mac, will install in weekend), is
this correct one?

[OT] I don't know if I can ask about a suggested distro here or not?
Anyway, me read that Fedore & Yellow Dog suits well for this?


Thanks,
~Akula2


2007-01-12 15:03:51

by Lennart Sorensen

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On Fri, Jan 12, 2007 at 06:55:32PM +0530, Sunil Naidu wrote:
> There are 2 cases:-
>
> #1 Intel Pentium 4 Workstation with HyperThreading
>
> Since kernel takes HT as 2 processors, I did say in KConfig as:
>
> CONFIG_SMP= y
> CONFIG_NR_CPUS=2
> CONFIG_SCHED_MC=not set
> CONFIG_MPENTIUM4=y (Or should I say CONFIG_X86_PC=y)
> CONFIG_SCHED_SMT=y
> CONFIG_SCHED_MC=not set
> RESOURCES_64BIT=not set
> HOTPLUG_CPU=not set
>
>
> Pl correct me if am wrong.
>
>
> #2 Intel Core2Duo Processor - Laptop
>
> CONFIG_SMP= y
> CONFIG_NR_CPUS=4 ??
> CONFIG_SCHED_MC=y
> CONFIG_X86_PC=y ? (if wrong, what should I set for Xeon QuadCore)
> CONFIG_SCHED_SMT=not set
> CONFIG_SCHED_MC=y
> RESOURCES_64BIT=not set
> HOTPLUG_CPU=not set
>
> I didn't start this yet (still with Mac, will install in weekend), is
> this correct one?
>
> [OT] I don't know if I can ask about a suggested distro here or not?
> Anyway, me read that Fedore & Yellow Dog suits well for this?

I would expect any distribution should work on these (as long as the
kernel they use isn't too old.). Of course if it is a Mac, you need a
distribution that supports their firmware (which is of course not a PC
bios). As long as you can boot it, any i386 or amd64 kernel with smp
enabled should use all the processors present (well amd64 on the
core2duo and on the p4 if it is em64t enabled).

I believe the closest optimization for a Core2 is probably the Pentium M
(certainly not the P4/netburst). Not entirely sure though.

--
Len Sorensen

2007-01-12 23:21:14

by Sunil Naidu

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On 1/12/07, Lennart Sorensen <[email protected]> wrote:
>
> I would expect any distribution should work on these (as long as the
> kernel they use isn't too old.). Of course if it is a Mac, you need a
> distribution that supports their firmware (which is of course not a PC
> bios). As long as you can boot it, any i386 or amd64 kernel with smp
> enabled should use all the processors present (well amd64 on the
> core2duo and on the p4 if it is em64t enabled).

It is not a Mac here, IBM Workstation. I can see the Processor as
Pentium 4 CPU 3. GHz (family 15, model 4). How to know EM64T enabled,
any command?

Trying to understand, should I set CPUSETS=y and SCHED_MC=y Or ignore them.

> I believe the closest optimization for a Core2 is probably the Pentium M
> (certainly not the P4/netburst). Not entirely sure though.
>

Yep, this ia a MacBookPro. I have decided about the distro. I did ask
this doubt when I got for the custom kernel compilation from source
after installation.

What I have seen in KConfig is, MPENTIUM4 used for the Xeon processor
too. I would try this soon on my Laptop (with SMP since it's a
Core2Duo). Anyway, shall post here.

> --
> Len Sorensen

Thanks,

~Sunil

2007-01-12 23:29:11

by Paul Jackson

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

> Trying to understand, should I set CPUSETS=y

You don't need CPUSETS for this small a system.

But setting it is harmless - for example at least
one major commercial distribution enables CPUSETS
on almost all their product, most of which is running
on PC's less powerful than yours.

CPUSETS provides a facility for managing the memory
and processor placement of jobs running on what are
typically big NUMA systems. Job X runs on CPUs 0-3
with memory on Nodes 0-1, while Job Y runs on CPUs
4-7 and Nodes 2-3. And bigger ... to hundreds and
thousands of CPUs and Nodes.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2007-01-13 03:38:48

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On Fri, 12 Jan 2007 10:03:49 EST, Lennart Sorensen said:
>
> I would expect any distribution should work on these (as long as the
> kernel they use isn't too old.). Of course if it is a Mac, you need a
> distribution that supports their firmware (which is of course not a PC
> bios). As long as you can boot it, any i386 or amd64 kernel with smp
> enabled should use all the processors present (well amd64 on the
> core2duo and on the p4 if it is em64t enabled).

amd64 will only work on a core2duo if it's a T7200 or higher - the
lower numbers are 32-bit-only chipsets. I admit not knowing what
exact variant the Mac has.

> I believe the closest optimization for a Core2 is probably the Pentium M
> (certainly not the P4/netburst). Not entirely sure though.

CONFIG_MCORE2=y

That's probably even closer :) At least in 2.6.20-rc4-mm1.


Attachments:
(No filename) (226.00 B)

2007-01-13 12:08:03

by Stefan Richter

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On 1/13/2007 4:38 AM, [email protected] wrote:
> On Fri, 12 Jan 2007 10:03:49 EST, Lennart Sorensen said:
>> I believe the closest optimization for a Core2 is probably the Pentium M
>> (certainly not the P4/netburst). Not entirely sure though.
>
> CONFIG_MCORE2=y
>
> That's probably even closer :) At least in 2.6.20-rc4-mm1.

Here is some more information, not about kernel configuration parameters
but more generally about gcc flags to be used with Core and Core 2 CPUs:
http://www.gentoo.org/news/en/gwn/20061211-newsletter.xml#doc_chap2_sect3

Quoting their source, http://psykil.livejournal.com/2006/12/03/:
| If you're using GCC 4.1, use -march=prescott for Intel Core Solo/Duo
| and -march=nocona (and an amd64 profile) for Core 2 Solo/Duo. For GCC
| 4.2, a Core Solo/Duo should use -march=prescott -mtune=generic, and
| Core 2 Solo/Duo should be set to -march=nocona -mtune=generic. GCC
| trunk adds -march=core2 and support for the SSSE3 instruction set, but
| that won't be out for quite a while yet.
|
| If you do happen to be using GCC 4.2, check out the very cool
| -march=native, which will autodetect the host processor(s) and set
| -march and -mtune accordingly. For Core CPU's you'll also need the
| patch from GCC PR #30040.

--
Stefan Richter
-=====-=-=== ---= -==-=
http://arcgraph.de/sr/

2007-01-13 17:54:45

by Lennart Sorensen

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On Fri, Jan 12, 2007 at 10:38:43PM -0500, [email protected] wrote:
> amd64 will only work on a core2duo if it's a T7200 or higher - the
> lower numbers are 32-bit-only chipsets. I admit not knowing what
> exact variant the Mac has.

The Core Duo had 32bit only (being a Pentium M), but the Core 2 Duo
should always be 64bit capable (at least that is what this list says:
http://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors#Core_2_Duo_2
)

> CONFIG_MCORE2=y

Oh good. Makes life much simpler for users.

--
Len Sorensen

2007-01-13 20:16:46

by Bill Davidsen

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

[email protected] wrote:
> On Fri, 12 Jan 2007 10:03:49 EST, Lennart Sorensen said:
>> I would expect any distribution should work on these (as long as the
>> kernel they use isn't too old.). Of course if it is a Mac, you need a
>> distribution that supports their firmware (which is of course not a PC
>> bios). As long as you can boot it, any i386 or amd64 kernel with smp
>> enabled should use all the processors present (well amd64 on the
>> core2duo and on the p4 if it is em64t enabled).
>
> amd64 will only work on a core2duo if it's a T7200 or higher - the
> lower numbers are 32-bit-only chipsets. I admit not knowing what
> exact variant the Mac has.

I don't believe that's correct, the Intel features page indicates all
core2 have both 64bit and virtualization. Perhaps some of the core (no
2) models didn't? Even the old 930 had those features by my notes.
>
>> I believe the closest optimization for a Core2 is probably the Pentium M
>> (certainly not the P4/netburst). Not entirely sure though.
>
> CONFIG_MCORE2=y
>
> That's probably even closer :) At least in 2.6.20-rc4-mm1.

2007-01-14 01:55:54

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On Sat, 13 Jan 2007 15:18:31 EST, Bill Davidsen said:
> [email protected] wrote:
> > On Fri, 12 Jan 2007 10:03:49 EST, Lennart Sorensen said:
> >> I would expect any distribution should work on these (as long as the
> >> kernel they use isn't too old.). Of course if it is a Mac, you need a
> >> distribution that supports their firmware (which is of course not a PC
> >> bios). As long as you can boot it, any i386 or amd64 kernel with smp
> >> enabled should use all the processors present (well amd64 on the
> >> core2duo and on the p4 if it is em64t enabled).
> >
> > amd64 will only work on a core2duo if it's a T7200 or higher - the
> > lower numbers are 32-bit-only chipsets. I admit not knowing what
> > exact variant the Mac has.
>
> I don't believe that's correct, the Intel features page indicates all
> core2 have both 64bit and virtualization. Perhaps some of the core (no
> 2) models didn't? Even the old 930 had those features by my notes.

My screwup - the chart I looked at managed to get the Core and Core2 series
mixed up. Here's a hopefully more canonical one:

http://www.intel.com/products/processor_number/proc_info_table.pdf

Does however list some Core2 that don't do virtualization (page 3, the
T5600 and T5500), which is what I think confused the author of the table
that I misread. ;)


Attachments:
(No filename) (226.00 B)

2007-01-14 02:21:27

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On Sat, 13 Jan 2007 12:54:43 EST, Lennart Sorensen said:
> On Fri, Jan 12, 2007 at 10:38:43PM -0500, [email protected] wrote:
> > CONFIG_MCORE2=y
>
> Oh good. Makes life much simpler for users.

After writing that, I actually went back and *checked* the fine print.
It turns out that unless you have installed a not-yet-escaped release of
gcc, -mtune=core2 doesn't work, so it punts to -mtune=generic. Wandering
over to http://gcc.gnu.org and searching the mailing lists, it seems that
on most of the benchmarks, -mtune=core2 was only a 0.5% or so win on most
stuff in its current form.


Attachments:
(No filename) (226.00 B)

2007-01-14 15:50:57

by Bill Davidsen

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

[email protected] wrote:
> On Sat, 13 Jan 2007 15:18:31 EST, Bill Davidsen said:
>> [email protected] wrote:
>>> On Fri, 12 Jan 2007 10:03:49 EST, Lennart Sorensen said:
>>>> I would expect any distribution should work on these (as long as the
>>>> kernel they use isn't too old.). Of course if it is a Mac, you need a
>>>> distribution that supports their firmware (which is of course not a PC
>>>> bios). As long as you can boot it, any i386 or amd64 kernel with smp
>>>> enabled should use all the processors present (well amd64 on the
>>>> core2duo and on the p4 if it is em64t enabled).
>>> amd64 will only work on a core2duo if it's a T7200 or higher - the
>>> lower numbers are 32-bit-only chipsets. I admit not knowing what
>>> exact variant the Mac has.
>> I don't believe that's correct, the Intel features page indicates all
>> core2 have both 64bit and virtualization. Perhaps some of the core (no
>> 2) models didn't? Even the old 930 had those features by my notes.
>
> My screwup - the chart I looked at managed to get the Core and Core2 series
> mixed up. Here's a hopefully more canonical one:
>
> http://www.intel.com/products/processor_number/proc_info_table.pdf
>
> Does however list some Core2 that don't do virtualization (page 3, the
> T5600 and T5500), which is what I think confused the author of the table
> that I misread. ;)

I missed those in terms of virtualization, but it seems that all core2
support "intel 64" which I assume means emt64t, and what I thought
Valdis meant by "the lower numbers are 32-bit-only chipsets." They all
do seem to have 64bit, and should run 64bit Linux just fine.
--
bill davidsen <[email protected]>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979

2007-01-20 03:45:28

by Sunil Naidu

[permalink] [raw]
Subject: Re: Choosing a HyperThreading/SMP/MultiCore kernel ?

On 1/13/07, Lennart Sorensen <[email protected]> wrote:
> On Fri, Jan 12, 2007 at 10:38:43PM -0500, [email protected] wrote:
> > amd64 will only work on a core2duo if it's a T7200 or higher - the
> > lower numbers are 32-bit-only chipsets. I admit not knowing what
> > exact variant the Mac has.

2.33GHz Intel Core 2 Duo - 4MB shared L2 cache with ATI Mobility
Radeon X1600 with 256MB of GDDR3 SDRAM


> The Core Duo had 32bit only (being a Pentium M), but the Core 2 Duo
> should always be 64bit capable (at least that is what this list says:
> http://en.wikipedia.org/wiki/List_of_Intel_Core_2_microprocessors#Core_2_Duo_2
> )

Thank's for that. Yep, it is 64-bit capable with EM64T & with Intel
Vitualization.

I do not know yet whether 2.6.19 or 2.6.20-rc5 supports and iSight
Video Camera, ATI DDR3 support, Apple Mobile Remote Control, and some
sensors like Motion, Light, Thermal, etc. (any suggestion where to
look for linux support?).

>
> > CONFIG_MCORE2=y
>

Got it, thanks

>
> --
> Len Sorensen
>

Should I wait for 2.6.20 release so that code would run with no oops
or less problematic?

Thanks,

~Akula2