linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hyperthreading
@ 2003-11-25  9:44 Gábor Lénárt
  2003-11-25  9:48 ` hyperthreading Emiliano 'AlberT' Gabrielli
  2003-11-25 10:22 ` hyperthreading Karl Pitrich
  0 siblings, 2 replies; 42+ messages in thread
From: Gábor Lénárt @ 2003-11-25  9:44 UTC (permalink / raw)
  To: linux-kernel

Hi,

A somewhat stupid question from me, but I have no documentation about
this topic, namely, how can I enable hyperthreading with 2.6.0 test
kernels?

My /proc/cpuinfo shows:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 1
model name      : Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping        : 2
cpu MHz         : 1694.605
cache size      : 256 KB
[...]
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips        : 3334.14

I built kernel, with SMP, ACPI, APIC, etc etc etc support, but I don't see
any change. The only description I could find in Documentation/ is "acpi=ht"
about this topic saying that it's enabled enough ACPI just for enabling
HT. But I would like to have full ACPI and HT.

-- 
- Gábor (larta'H)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25  9:44 hyperthreading Gábor Lénárt
@ 2003-11-25  9:48 ` Emiliano 'AlberT' Gabrielli
  2003-11-25 10:05   ` hyperthreading Gábor Lénárt
  2003-11-29 13:29   ` hyperthreading Bill Davidsen
  2003-11-25 10:22 ` hyperthreading Karl Pitrich
  1 sibling, 2 replies; 42+ messages in thread
From: Emiliano 'AlberT' Gabrielli @ 2003-11-25  9:48 UTC (permalink / raw)
  To: lgb, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10:44, martedì 25 novembre 2003, Gábor Lénárt wrote:
> Hi,
>
> A somewhat stupid question from me, but I have no documentation about
> this topic, namely, how can I enable hyperthreading with 2.6.0 test
> kernels?
>
> My /proc/cpuinfo shows:
>
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 1
> model name      : Intel(R) Pentium(R) 4 CPU 1.70GHz
> stepping        : 2
> cpu MHz         : 1694.605
> cache size      : 256 KB
> [...]
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> bogomips        : 3334.14


P4 does not support HT ... only Xeon and new generation P4-HT does.

moreover you need olso a MB with HT support

- -- 
<?php echo '       Emiliano `AlberT` Gabrielli       '."\n".
           '  E-Mail: AlberT_AT_SuperAlberT_it  '."\n".
           '  Web:    http://SuperAlberT.it  '."\n".
'  IRC:    #php,#AES azzurra.com '."\n".'ICQ: 158591185'; ?>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/wyWDF4boRkzPHocRAhw5AJ95gD2xOL7AtfqKo2eOl0nQXbXl6wCgzsIB
lWN9pkyqelZ8cRIZoypklrw=
=uylL
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25  9:48 ` hyperthreading Emiliano 'AlberT' Gabrielli
@ 2003-11-25 10:05   ` Gábor Lénárt
  2003-11-25 10:16     ` hyperthreading Arjan van de Ven
  2003-11-25 10:32     ` hyperthreading Måns Rullgård
  2003-11-29 13:29   ` hyperthreading Bill Davidsen
  1 sibling, 2 replies; 42+ messages in thread
From: Gábor Lénárt @ 2003-11-25 10:05 UTC (permalink / raw)
  To: AlberT; +Cc: linux-kernel

On Tue, Nov 25, 2003 at 10:48:51AM +0100, Emiliano 'AlberT' Gabrielli wrote:
[...]
> > flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> > cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> > bogomips        : 3334.14
> 
> 
> P4 does not support HT ... only Xeon and new generation P4-HT does.

OK, but if this CPU does not support HT, then why 'ht' is shown at
flags in /proc/cpuinfo? It looks like quite illogical for me then ...

- Gábor (larta'H)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25 10:05   ` hyperthreading Gábor Lénárt
@ 2003-11-25 10:16     ` Arjan van de Ven
  2003-11-25 10:32     ` hyperthreading Måns Rullgård
  1 sibling, 0 replies; 42+ messages in thread
From: Arjan van de Ven @ 2003-11-25 10:16 UTC (permalink / raw)
  To: lgb; +Cc: AlberT, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

On Tue, 2003-11-25 at 11:05, Gábor Lénárt wrote:
> On Tue, Nov 25, 2003 at 10:48:51AM +0100, Emiliano 'AlberT' Gabrielli wrote:
\
> OK, but if this CPU does not support HT, then why 'ht' is shown at
> flags in /proc/cpuinfo? It looks like quite illogical for me then ...

/proc/cpuinfo only reports what the cpu reports. The 'ht' flag means not
HyperThreading per se. It means it listens to the "rep; nop" sequence
for example. Also all Hyperthreading capable cpus have this flag set,
but that is a one way relationship. Esp since this needs more support
than just the cpu.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25  9:44 hyperthreading Gábor Lénárt
  2003-11-25  9:48 ` hyperthreading Emiliano 'AlberT' Gabrielli
@ 2003-11-25 10:22 ` Karl Pitrich
  1 sibling, 0 replies; 42+ messages in thread
From: Karl Pitrich @ 2003-11-25 10:22 UTC (permalink / raw)
  To: lgb; +Cc: linux-kernel

On Tue, 2003-11-25 at 10:44, Gábor Lénárt wrote:

> A somewhat stupid question from me, but I have no documentation about
> this topic, namely, how can I enable hyperthreading with 2.6.0 test
> kernels?

HT is normally enabled in the machine's bios.
at least on various IBM's.
if i enable HT in my bios, the kernel detects 4 cpu's, 2 otherwise.

/ karl


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25 10:05   ` hyperthreading Gábor Lénárt
  2003-11-25 10:16     ` hyperthreading Arjan van de Ven
@ 2003-11-25 10:32     ` Måns Rullgård
  2003-11-25 10:45       ` hyperthreading Mikael Pettersson
  1 sibling, 1 reply; 42+ messages in thread
From: Måns Rullgård @ 2003-11-25 10:32 UTC (permalink / raw)
  To: linux-kernel

Gábor Lénárt <lgb@lgb.hu> writes:

>> > flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
>> > cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
>> > bogomips        : 3334.14
>> 
>> 
>> P4 does not support HT ... only Xeon and new generation P4-HT does.
>
> OK, but if this CPU does not support HT, then why 'ht' is shown at
> flags in /proc/cpuinfo? It looks like quite illogical for me then ...

I've been wondering about that myself.  I'm sure my P4M doesn't have
any hyperthreading.

-- 
Måns Rullgård
mru@kth.se


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25 10:32     ` hyperthreading Måns Rullgård
@ 2003-11-25 10:45       ` Mikael Pettersson
  0 siblings, 0 replies; 42+ messages in thread
From: Mikael Pettersson @ 2003-11-25 10:45 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: linux-kernel

Måns Rullgård writes:
 > Gábor Lénárt <lgb@lgb.hu> writes:
 > 
 > >> > flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
 > >> > cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
 > >> > bogomips        : 3334.14
 > >> 
 > >> 
 > >> P4 does not support HT ... only Xeon and new generation P4-HT does.
 > >
 > > OK, but if this CPU does not support HT, then why 'ht' is shown at
 > > flags in /proc/cpuinfo? It looks like quite illogical for me then ...
 > 
 > I've been wondering about that myself.  I'm sure my P4M doesn't have
 > any hyperthreading.

Don't people read Intel docs any more?

- The HT feature flag means "might have HT, check further to make sure".
- "check further" involves checking #siblings >= 2 via CPUID.
  Old P4s typically announce HT but have #siblings < 2.
- Intel made HT enabling a hardware thing via the chipset (a pin
  sampled at reset). BIOS can disable HT but only HW can enable it.
  This is why you can't put a HT-capable P4 in a non-HT-chipset
  machine and expect it to work -- although PowerLeap seemed to
  have an adapter to "fix" that.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-25  9:48 ` hyperthreading Emiliano 'AlberT' Gabrielli
  2003-11-25 10:05   ` hyperthreading Gábor Lénárt
@ 2003-11-29 13:29   ` Bill Davidsen
  2003-12-01 10:53     ` hyperthreading Emiliano 'AlberT' Gabrielli
  1 sibling, 1 reply; 42+ messages in thread
From: Bill Davidsen @ 2003-11-29 13:29 UTC (permalink / raw)
  To: AlberT; +Cc: lgb, linux-kernel

On Tue, 25 Nov 2003, Emiliano 'AlberT' Gabrielli wrote:


> P4 does not support HT ... only Xeon and new generation P4-HT does.

Not quite right, the 3.06GHz has HT enabled.
> 
> moreover you need olso a MB with HT support

IIRC there's a pin which must be powered to enable HT at boot, but I
believe Powerleap does make an adaptor to do that. AFAIK all P4's have HT,
but most have only one sibling, so there's no use or benefit from the
feature.

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: hyperthreading
  2003-11-29 13:29   ` hyperthreading Bill Davidsen
@ 2003-12-01 10:53     ` Emiliano 'AlberT' Gabrielli
  0 siblings, 0 replies; 42+ messages in thread
From: Emiliano 'AlberT' Gabrielli @ 2003-12-01 10:53 UTC (permalink / raw)
  To: Bill Davidsen, AlberT; +Cc: lgb, linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14:29, sabato 29 novembre 2003, Bill Davidsen wrote:
> new generation P4-HT does.
>
> Not quite right, the 3.06GHz has HT enabled.

P4-HT is a my neologism, intended to indicate newest P4 ... 3.06GHz is in this 
category

- -- 
<?php echo '       Emiliano `AlberT` Gabrielli       '."\n".
           '  E-Mail: AlberT_AT_SuperAlberT_it  '."\n".
           '  Web:    http://SuperAlberT.it  '."\n".
'  IRC:    #php,#AES azzurra.com '."\n".'ICQ: 158591185'; ?>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/yx2oF4boRkzPHocRArViAJ9DzwCwzyE4PvS+zAoF44/rwSHFiwCfdUcO
IVzuaP8XxU0F8Gd/QrZkqnw=
=TKeD
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 21:55         ` Hyperthreading Banai Zoltan
  2002-08-22  8:05           ` Hyperthreading venom
@ 2002-08-26 19:00           ` Kelsey Hudson
  1 sibling, 0 replies; 42+ messages in thread
From: Kelsey Hudson @ 2002-08-26 19:00 UTC (permalink / raw)
  To: Banai Zoltan; +Cc: linux-kernel

On Wed, 21 Aug 2002, Banai Zoltan wrote:

> If this is correct, and there is not destop P4 capable of ht,
> then what does mean the ht flag in cpuinfo?

That's a good question. I'm not sure.

> $cat /proc/cpuinfo 
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 1
> model name      : Intel(R) Pentium(R) 4 CPU 1.70GHz
> stepping        : 2
> cpu MHz         : 1694.907
> cache size      : 256 KB
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 2
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> bogomips        : 3381.65
>                                                          ^^

You could always compile an SMP kernel and turn on ACPI System support... 
If your machine boots up and shows two CPUs, it's hyperthread-capable. 
Note that your BIOS also must support this feature...

-- 
 Kelsey Hudson                                       khudson@compendium.us
 Software Engineer/UNIX Systems Administrator
 Compendium Technologies, Inc                               (619) 725-0771
---------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-23  8:10       ` Hyperthreading Hugh Dickins
@ 2002-08-23  8:27         ` Alan Cox
  0 siblings, 0 replies; 42+ messages in thread
From: Alan Cox @ 2002-08-23  8:27 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Gilad Ben-Yossef, James Bourne, Reed, Timothy A, linux-kernel

On Fri, 2002-08-23 at 09:10, Hugh Dickins wrote
> The mainline 2.4 does not take that into consideration, and so far
> as I can see (please correct me), nor does 2.5 as yet - will probably
> get added from 2.4 -aa or -ac in due course.  It's not an issue of
> correctness, just optimality.

Its disabled in -ac too. The scheduling balance patches were causing
crashes


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-23  7:28     ` Hyperthreading Gilad Ben-Yossef
  2002-08-23  8:10       ` Hyperthreading Hugh Dickins
@ 2002-08-23  8:12       ` venom
  1 sibling, 0 replies; 42+ messages in thread
From: venom @ 2002-08-23  8:12 UTC (permalink / raw)
  To: Gilad Ben-Yossef
  Cc: Hugh Dickins, James Bourne, Reed, Timothy A, linux-kernel

On 23 Aug 2002, Gilad Ben-Yossef wrote:

> Date: 23 Aug 2002 10:28:08 +0300
> From: Gilad Ben-Yossef <gilad@benyossef.com>
> To: Hugh Dickins <hugh@veritas.com>
> Cc: James Bourne <jbourne@mtroyal.ab.ca>,
>      "Reed, Timothy A" <timothy.a.reed@lmco.com>,
>      linux-kernel@vger.kernel.org
> Subject: Re: Hyperthreading
>
> On Wed, 2002-08-21 at 20:33, Hugh Dickins wrote:
> > On Wed, 21 Aug 2002, James Bourne wrote:
> > > On Wed, 21 Aug 2002, Reed, Timothy A wrote:
> > > >
> > > > Can anyone lead me to a good source of information on what options should be
> > > > in the kernel for hyperthreading??  I am still fighting with a
> > > > sub-contractor over kernel options.
> > >
> > > As long as you have a P4 and use the P4 support you will get
> > > hyperthreading with 2.4.19 (CONFIG_MPENTIUM4=y).  2.4.18 you have to also
> > > turn it on with a lilo option of acpismp=force on the kernel command line.
> >
> > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > just appropriate to that processor in other ways.
>
>
> hmm... isn't there an option to tell the kernel you are using a
> HyperThreaded system, or is it detected on runtime?  I mean, think about
> a P4 Xeon 2 way SMP - unless told otherwise the kernel will 'see' it as
> a 4 way SMP box *but* the proccessors are not equel!
>
> If for example, you have a task running and another task just woke up
> and the scheduler needs to assign a CPU for it, choosing the other
> 'instance' of the same CPU as the already running task to run it on as
> opposed to choosing one of the 'instanaces' of the other seperate CPU
> seems a mistake IMHO, but the scheduler won't be able to make the
> judgment because it doesn't know it is running on a SMT box at all.
>
> Or am I missing something? :-)
>
with a dual processor with hyper threading where the kernel sees
CPU0-CPU1 (first CPU) and CPU2-CPU3 (second CPU), and you run a cpu
wasting job, it will be scheduled on CPU0, then the second CPU wastint job
will be scheduled on CPU2, and so on, with this alternation
CPU0-CPU2-CPU1-CPU3. So, as you see, the scheduler is smarter, and this
way it CPUs are used at best for what the system can. Then maybe there
could be some discussion about MPI jobs, (I should make some test, and I
am curious to listen someone else experience).

Luigi




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-23  7:28     ` Hyperthreading Gilad Ben-Yossef
@ 2002-08-23  8:10       ` Hugh Dickins
  2002-08-23  8:27         ` Hyperthreading Alan Cox
  2002-08-23  8:12       ` Hyperthreading venom
  1 sibling, 1 reply; 42+ messages in thread
From: Hugh Dickins @ 2002-08-23  8:10 UTC (permalink / raw)
  To: Gilad Ben-Yossef; +Cc: James Bourne, Reed, Timothy A, linux-kernel

On 23 Aug 2002, Gilad Ben-Yossef wrote:
> 
> hmm... isn't there an option to tell the kernel you are using a
> HyperThreaded system, or is it detected on runtime?  I mean, think about
> a P4 Xeon 2 way SMP - unless told otherwise the kernel will 'see' it as
> a 4 way SMP box *but* the proccessors are not equel!

There is the "noht" boot arg to tell the kernel not to use HT,
and there is the X86_FEATURE_HT cpu capability flag, but I think
the runtime indication you're looking for is smp_num_siblings:
1 without HT, 2 (ever more?) with HT.

> If for example, you have a task running and another task just woke up
> and the scheduler needs to assign a CPU for it, choosing the other
> 'instance' of the same CPU as the already running task to run it on as
> opposed to choosing one of the 'instanaces' of the other seperate CPU
> seems a mistake IMHO, but the scheduler won't be able to make the
> judgment because it doesn't know it is running on a SMT box at all.

SMT I don't know.  Your point is valid, and you'll find the 2.4 -aa
and -ac trees (both using newer O1 scheduler) each have code in (or
called out from) kernel/sched.c to deal with that.

The mainline 2.4 does not take that into consideration, and so far
as I can see (please correct me), nor does 2.5 as yet - will probably
get added from 2.4 -aa or -ac in due course.  It's not an issue of
correctness, just optimality.

Hugh


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 17:33   ` Hyperthreading Hugh Dickins
  2002-08-21 19:34     ` Hyperthreading James Bourne
@ 2002-08-23  7:28     ` Gilad Ben-Yossef
  2002-08-23  8:10       ` Hyperthreading Hugh Dickins
  2002-08-23  8:12       ` Hyperthreading venom
  1 sibling, 2 replies; 42+ messages in thread
From: Gilad Ben-Yossef @ 2002-08-23  7:28 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: James Bourne, Reed, Timothy A, linux-kernel

On Wed, 2002-08-21 at 20:33, Hugh Dickins wrote:
> On Wed, 21 Aug 2002, James Bourne wrote:
> > On Wed, 21 Aug 2002, Reed, Timothy A wrote:
> > > 
> > > Can anyone lead me to a good source of information on what options should be
> > > in the kernel for hyperthreading??  I am still fighting with a
> > > sub-contractor over kernel options.
> > 
> > As long as you have a P4 and use the P4 support you will get
> > hyperthreading with 2.4.19 (CONFIG_MPENTIUM4=y).  2.4.18 you have to also 
> > turn it on with a lilo option of acpismp=force on the kernel command line.
> 
> You do need CONFIG_SMP and a processor capable of HyperThreading,
> i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> just appropriate to that processor in other ways.


hmm... isn't there an option to tell the kernel you are using a
HyperThreaded system, or is it detected on runtime?  I mean, think about
a P4 Xeon 2 way SMP - unless told otherwise the kernel will 'see' it as
a 4 way SMP box *but* the proccessors are not equel!

If for example, you have a task running and another task just woke up
and the scheduler needs to assign a CPU for it, choosing the other
'instance' of the same CPU as the already running task to run it on as
opposed to choosing one of the 'instanaces' of the other seperate CPU
seems a mistake IMHO, but the scheduler won't be able to make the
judgment because it doesn't know it is running on a SMT box at all.

Or am I missing something? :-)

Gilad.

-- 
Gilad Ben-Yossef <gilad@benyossef.com>
http://benyossef.com

"Money talks, bullshit walks and GNU awks."
  -- Shachar "Sun" Shemesh, debt collector for the GNU/Yakuza


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-22 14:06 ` Hyperthreading Hugh Dickins
@ 2002-08-22 14:36   ` Marc Dietrich
  0 siblings, 0 replies; 42+ messages in thread
From: Marc Dietrich @ 2002-08-22 14:36 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: linux-kernel

Am Donnerstag, 22. August 2002 :06 schrieben Sie:
> On Thu, 22 Aug 2002, Marc Dietrich wrote:
> > On Wed, 21 Aug 2002, Hugh Dickins wrote:
> > > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > > just appropriate to that processor in other ways.
> >
> > I used KNOPPIX on a 2 way Dell WS 530 (Xeon 2.0 GHz). This distribution
> > has CONFIG_M386 set (as most others also?) and HT was not enabled. I
> > compiled the kernel myself (same config as KNOPPIX but with
> > CONFIG_MPENTIUM4) and HT gets enabled. So is _does_ matter for which
> > processor the kernel is optimized.
>
> I'm surprised - perhaps the Knoppix distribution did not have SMP enabled
> itself, but installed a config with CONFIG_SMP?  Or you built more recent
> kernel sources (2.4.19 defaults to HT on) than the Knoppix distribution
> (vanilla 2.4.18 defaults to HT off)?

I don't think so. Original kernel gives me 2 penguins and cpuinfo shows 2 
cpu's. Kernel is 2.4.19 with xfs patches and there is no "noht" option. I 
attached a dmesg file of this one. Btw, setting the processor also sets some 
other options (CMPXCHG, TCS, PGE, ...).

> It would be awkward for me to try CONFIG_M386 on our P4 Xeon, but I did
> just try building a CONFIG_M586 CONFIG_SMP kernel for it, which behaved
> as I expected: /proc/cpuinfo showed 4 cpus, but only 2 cpus when booted
> with "noht".

Give it a try. A dual Xeon won't take to much time to compile a new kernel ;)

Greetings

Marc

-- 
Marc Dietrich


^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
  2002-08-22 12:58 Hyperthreading Nir Soffer
@ 2002-08-22 14:30 ` Hugh Dickins
  0 siblings, 0 replies; 42+ messages in thread
From: Hugh Dickins @ 2002-08-22 14:30 UTC (permalink / raw)
  To: Nir Soffer; +Cc: Alan Cox, James Bourne, Reed, Timothy A, linux-kernel

On Thu, 22 Aug 2002, Nir Soffer wrote:
> 
> Grepping for MPENTIUM4 in the tree only shows up that it causes the
> kernel to be compiled with -march=i686, much like M686 and  MPENTIUMIII.
> Are there more subtle ways it affects the kernel that I missed? (in the
> 2.4.x tree)

arch/i386/config.in is where the processor characteristics CONFIG_X86_...
are derived from processor type.  There's only one difference between
the CONFIG_MPENTIUMIII configs and the CONFIG_MPENTIUM4 configs (in
2.4.18 or 2.4.19 or 2.4.20-pre4): CONFIG_X86_L1_CACHE_SHIFT 5 or 7.

Alan, that reminds me: 2.4.20-ac sets CONFIG_X86_L1_CACHE_SHIFT 7
when CONFIG_MPENTIUMIII: looks wrong, but perhaps there's a reason?

Hugh


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-22  9:15 Hyperthreading Marc Dietrich
@ 2002-08-22 14:06 ` Hugh Dickins
  2002-08-22 14:36   ` Hyperthreading Marc Dietrich
  0 siblings, 1 reply; 42+ messages in thread
From: Hugh Dickins @ 2002-08-22 14:06 UTC (permalink / raw)
  To: Marc Dietrich; +Cc: linux-kernel

On Thu, 22 Aug 2002, Marc Dietrich wrote:
> On Wed, 21 Aug 2002, Hugh Dickins wrote:
> > 
> > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > just appropriate to that processor in other ways.
> 
> I used KNOPPIX on a 2 way Dell WS 530 (Xeon 2.0 GHz). This distribution has 
> CONFIG_M386 set (as most others also?) and HT was not enabled. I compiled the 
> kernel myself (same config as KNOPPIX but with CONFIG_MPENTIUM4) and HT gets 
> enabled. So is _does_ matter for which processor the kernel is optimized.

I'm surprised - perhaps the Knoppix distribution did not have SMP enabled
itself, but installed a config with CONFIG_SMP?  Or you built more recent
kernel sources (2.4.19 defaults to HT on) than the Knoppix distribution
(vanilla 2.4.18 defaults to HT off)?

It would be awkward for me to try CONFIG_M386 on our P4 Xeon, but I did
just try building a CONFIG_M586 CONFIG_SMP kernel for it, which behaved
as I expected: /proc/cpuinfo showed 4 cpus, but only 2 cpus when booted
with "noht".

Hugh


^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
@ 2002-08-22 12:58 Nir Soffer
  2002-08-22 14:30 ` Hyperthreading Hugh Dickins
  0 siblings, 1 reply; 42+ messages in thread
From: Nir Soffer @ 2002-08-22 12:58 UTC (permalink / raw)
  To: Hugh Dickins, James Bourne; +Cc: Reed, Timothy A, linux-kernel

> On Wed, 21 Aug 2002, James Bourne wrote:
> > On Wed, 21 Aug 2002, Reed, Timothy A wrote:
> > > 
> > > Can anyone lead me to a good source of information on 
> what options should be
> > > in the kernel for hyperthreading??  I am still fighting with a
> > > sub-contractor over kernel options.
> > 
> > As long as you have a P4 and use the P4 support you will get
> > hyperthreading with 2.4.19 (CONFIG_MPENTIUM4=y).  2.4.18 
> you have to also 
> > turn it on with a lilo option of acpismp=force on the 
> kernel command line.
> 
> You do need CONFIG_SMP and a processor capable of HyperThreading,
> i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> just appropriate to that processor in other ways.
> 
> Hugh

Grepping for MPENTIUM4 in the tree only shows up that it causes the
kernel to be compiled with -march=i686, much like M686 and  MPENTIUMIII.
Are there more subtle ways it affects the kernel that I missed? (in the
2.4.x tree)

Thanks,
Nir.

--
Nir Soffer -=- Software Engineer, Exanet Inc. -=-
"Father, why are all the children weeping? / They are merely crying son
 O, are they merely crying, father? / Yes, true weeping is yet to come"
        -- Nick Cave and the Bad Seeds, The Weeping Song

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
@ 2002-08-22  9:15 Marc Dietrich
  2002-08-22 14:06 ` Hyperthreading Hugh Dickins
  0 siblings, 1 reply; 42+ messages in thread
From: Marc Dietrich @ 2002-08-22  9:15 UTC (permalink / raw)
  To: linux-kernel

On Wed, 21 Aug 2002, Hugh Dickens wrote:
> On Wed, 21 Aug 2002, James Bourne wrote:
> > On Wed, 21 Aug 2002, Reed, Timothy A wrote:
> > > 
> > > Can anyone lead me to a good source of information on what options > 
should be
> > > in the kernel for hyperthreading??  I am still fighting with a
> > > sub-contractor over kernel options.
> > 
> > As long as you have a P4 and use the P4 support you will get
> > hyperthreading with 2.4.19 (CONFIG_MPENTIUM4=y).  2.4.18 you have to also 
> > turn it on with a lilo option of acpismp=force on the kernel command line.
> 
> You do need CONFIG_SMP and a processor capable of HyperThreading,
> i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> just appropriate to that processor in other ways.

Hi,

I used KNOPPIX on a 2 way Dell WS 530 (Xeon 2.0 GHz). This distribution has 
CONFIG_M386 set (as most others also?) and HT was not enabled. I compiled the 
kernel myself (same config as KNOPPIX but with CONFIG_MPENTIUM4) and HT gets 
enabled. So is _does_ matter for which processor the kernel is optimized.

Greetings

Marc

-- 
Marc Dietrich


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 21:55         ` Hyperthreading Banai Zoltan
@ 2002-08-22  8:05           ` venom
  2002-08-26 19:00           ` Hyperthreading Kelsey Hudson
  1 sibling, 0 replies; 42+ messages in thread
From: venom @ 2002-08-22  8:05 UTC (permalink / raw)
  To: Banai Zoltan
  Cc: Kelsey Hudson, James Bourne, Hugh Dickins, Reed, Timothy A, linux-kernel

On Wed, 21 Aug 2002, Banai Zoltan wrote:

> Date: Wed, 21 Aug 2002 23:55:03 +0200
> From: Banai Zoltan <bazooka@emitel.hu>
> To: Kelsey Hudson <khudson@compendium.us>
> Cc: James Bourne <jbourne@mtroyal.ab.ca>, Hugh Dickins <hugh@veritas.com>,
>      "Reed, Timothy A" <timothy.a.reed@lmco.com>,
>      linux-kernel@vger.kernel.org
> Subject: Re: Hyperthreading
>
> On Wed, Aug 21, 2002 at 02:16:11PM -0700, Kelsey Hudson wrote:
> > On Wed, 21 Aug 2002, James Bourne wrote:
> >
> > > On Wed, 21 Aug 2002, Hugh Dickins wrote:
> > >
> > > > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > > > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > > > just appropriate to that processor in other ways.
> > >
> > > I was under the impression that the only CPU capable of hyperthreading was
> > > the P4 Xeon.  Is this not correct?  I don't know of any other CPUs that
> > > have the ht feature.
> >
> > This is currently correct, although I believe Intel has plans to release a
> > Hyperthreading-capable version of its desktop P4.
>
> If this is correct, and there is not destop P4 capable of ht,
> then what does mean the ht flag in cpuinfo?
>
> $cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 1
> model name      : Intel(R) Pentium(R) 4 CPU 1.70GHz
> stepping        : 2
> cpu MHz         : 1694.907
> cache size      : 256 KB
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 2
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> bogomips        : 3381.65
>                                                          ^^
In fact all PIV are capable of ht, but usually there is way to enable due
to bioses and similar




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 21:16       ` Hyperthreading Kelsey Hudson
  2002-08-21 21:55         ` Hyperthreading Banai Zoltan
@ 2002-08-22  8:00         ` venom
  1 sibling, 0 replies; 42+ messages in thread
From: venom @ 2002-08-22  8:00 UTC (permalink / raw)
  To: Kelsey Hudson; +Cc: James Bourne, Hugh Dickins, Reed, Timothy A, linux-kernel

On Wed, 21 Aug 2002, Kelsey Hudson wrote:

> Date: Wed, 21 Aug 2002 14:16:11 -0700 (PDT)
> From: Kelsey Hudson <khudson@compendium.us>
> To: James Bourne <jbourne@mtroyal.ab.ca>
> Cc: Hugh Dickins <hugh@veritas.com>,
>      "Reed, Timothy A" <timothy.a.reed@lmco.com>,
>      linux-kernel@vger.kernel.org
> Subject: Re: Hyperthreading
>
> On Wed, 21 Aug 2002, James Bourne wrote:
>
> > On Wed, 21 Aug 2002, Hugh Dickins wrote:
> >
> > > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > > just appropriate to that processor in other ways.
> >
> > I was under the impression that the only CPU capable of hyperthreading was
> > the P4 Xeon.  Is this not correct?  I don't know of any other CPUs that
> > have the ht feature.
>
> This is currently correct, although I believe Intel has plans to release a
> Hyperthreading-capable version of its desktop P4.

basically all PIV are capable of hyperthreading, non just Xeon, but it is
disabled and there is not way to enable it in Bios, so the most hang at
boot when you try to activate hyperthreading on them





^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
  2002-08-21 22:56 Hyperthreading Nakajima, Jun
@ 2002-08-21 23:45 ` Alan Cox
  0 siblings, 0 replies; 42+ messages in thread
From: Alan Cox @ 2002-08-21 23:45 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: Banai Zoltan, Kelsey Hudson, James Bourne, Hugh Dickins, Reed,
	Timothy A, linux-kernel

On Wed, 2002-08-21 at 23:56, Nakajima, Jun wrote:
> Since Pentium 4 and Xeon share the same core, you see the HT bit on Pentium
> 4 as well. The HT bit does not mean HT is enabled (you can enable/disable
> usually by the BIOS setup), but the number of the threads (i.e. logical
> CPUs) in a processor package must be 2 (via cpuid instruction) so that the
> OS can be sure that HT is enabled (see setup.c). The HT bit is just useful
> as a prerequisite for HT.

If you want to know the full HT capabilities of the processor you need
to read cpuid 1 and check ebx bits 16-23.

There has been some interesting speculation as to whether you can enable
HT by undocumented mtrrs on cpus that have "ht" but claim not to be
doing HT. Clearly the value returned is settable somewhere but I've seen
no proof yet than you can enable HT on non PIV Xeons this way.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
@ 2002-08-21 22:56 Nakajima, Jun
  2002-08-21 23:45 ` Hyperthreading Alan Cox
  0 siblings, 1 reply; 42+ messages in thread
From: Nakajima, Jun @ 2002-08-21 22:56 UTC (permalink / raw)
  To: Banai Zoltan, Kelsey Hudson
  Cc: James Bourne, Hugh Dickins, Reed, Timothy A, linux-kernel

Since Pentium 4 and Xeon share the same core, you see the HT bit on Pentium
4 as well. The HT bit does not mean HT is enabled (you can enable/disable
usually by the BIOS setup), but the number of the threads (i.e. logical
CPUs) in a processor package must be 2 (via cpuid instruction) so that the
OS can be sure that HT is enabled (see setup.c). The HT bit is just useful
as a prerequisite for HT.

Thanks,
Jun
-----Original Message-----
From: Banai Zoltan [mailto:bazooka@emitel.hu]
Sent: Wednesday, August 21, 2002 2:55 PM
To: Kelsey Hudson
Cc: James Bourne; Hugh Dickins; Reed, Timothy A;
linux-kernel@vger.kernel.org
Subject: Re: Hyperthreading


On Wed, Aug 21, 2002 at 02:16:11PM -0700, Kelsey Hudson wrote:
> On Wed, 21 Aug 2002, James Bourne wrote:
> 
> > On Wed, 21 Aug 2002, Hugh Dickins wrote:
> > 
> > > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > > just appropriate to that processor in other ways.
> > 
> > I was under the impression that the only CPU capable of hyperthreading
was
> > the P4 Xeon.  Is this not correct?  I don't know of any other CPUs that
> > have the ht feature.
> 
> This is currently correct, although I believe Intel has plans to release a

> Hyperthreading-capable version of its desktop P4. 

If this is correct, and there is not destop P4 capable of ht,
then what does mean the ht flag in cpuinfo?

$cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 1
model name      : Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping        : 2
cpu MHz         : 1694.907
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips        : 3381.65
                                                         ^^

> 
> > Also, looking at setup.c it's hard to determine if CONFIG_SMP is
> > actually required, but it doesn't look like it...
> 
> Of course it's required. How are you to take advantage of a "second CPU" 
> if your scheduler only works on a uniprocessor machine?
> 
> -- 
>  Kelsey Hudson                                       khudson@compendium.us
>  Software Engineer/UNIX Systems Administrator
>  Compendium Technologies, Inc                               (619) 725-0771
>
---------------------------------------------------------------------------
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Banai Zoltan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 21:16       ` Hyperthreading Kelsey Hudson
@ 2002-08-21 21:55         ` Banai Zoltan
  2002-08-22  8:05           ` Hyperthreading venom
  2002-08-26 19:00           ` Hyperthreading Kelsey Hudson
  2002-08-22  8:00         ` Hyperthreading venom
  1 sibling, 2 replies; 42+ messages in thread
From: Banai Zoltan @ 2002-08-21 21:55 UTC (permalink / raw)
  To: Kelsey Hudson; +Cc: James Bourne, Hugh Dickins, Reed, Timothy A, linux-kernel

On Wed, Aug 21, 2002 at 02:16:11PM -0700, Kelsey Hudson wrote:
> On Wed, 21 Aug 2002, James Bourne wrote:
> 
> > On Wed, 21 Aug 2002, Hugh Dickins wrote:
> > 
> > > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > > just appropriate to that processor in other ways.
> > 
> > I was under the impression that the only CPU capable of hyperthreading was
> > the P4 Xeon.  Is this not correct?  I don't know of any other CPUs that
> > have the ht feature.
> 
> This is currently correct, although I believe Intel has plans to release a 
> Hyperthreading-capable version of its desktop P4. 

If this is correct, and there is not destop P4 capable of ht,
then what does mean the ht flag in cpuinfo?

$cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 1
model name      : Intel(R) Pentium(R) 4 CPU 1.70GHz
stepping        : 2
cpu MHz         : 1694.907
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips        : 3381.65
                                                         ^^

> 
> > Also, looking at setup.c it's hard to determine if CONFIG_SMP is
> > actually required, but it doesn't look like it...
> 
> Of course it's required. How are you to take advantage of a "second CPU" 
> if your scheduler only works on a uniprocessor machine?
> 
> -- 
>  Kelsey Hudson                                       khudson@compendium.us
>  Software Engineer/UNIX Systems Administrator
>  Compendium Technologies, Inc                               (619) 725-0771
> ---------------------------------------------------------------------------
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Banai Zoltan

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 19:34     ` Hyperthreading James Bourne
@ 2002-08-21 21:16       ` Kelsey Hudson
  2002-08-21 21:55         ` Hyperthreading Banai Zoltan
  2002-08-22  8:00         ` Hyperthreading venom
  0 siblings, 2 replies; 42+ messages in thread
From: Kelsey Hudson @ 2002-08-21 21:16 UTC (permalink / raw)
  To: James Bourne; +Cc: Hugh Dickins, Reed, Timothy A, linux-kernel

On Wed, 21 Aug 2002, James Bourne wrote:

> On Wed, 21 Aug 2002, Hugh Dickins wrote:
> 
> > You do need CONFIG_SMP and a processor capable of HyperThreading,
> > i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> > just appropriate to that processor in other ways.
> 
> I was under the impression that the only CPU capable of hyperthreading was
> the P4 Xeon.  Is this not correct?  I don't know of any other CPUs that
> have the ht feature.

This is currently correct, although I believe Intel has plans to release a 
Hyperthreading-capable version of its desktop P4. 

> Also, looking at setup.c it's hard to determine if CONFIG_SMP is
> actually required, but it doesn't look like it...

Of course it's required. How are you to take advantage of a "second CPU" 
if your scheduler only works on a uniprocessor machine?

-- 
 Kelsey Hudson                                       khudson@compendium.us
 Software Engineer/UNIX Systems Administrator
 Compendium Technologies, Inc                               (619) 725-0771
---------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 17:33   ` Hyperthreading Hugh Dickins
@ 2002-08-21 19:34     ` James Bourne
  2002-08-21 21:16       ` Hyperthreading Kelsey Hudson
  2002-08-23  7:28     ` Hyperthreading Gilad Ben-Yossef
  1 sibling, 1 reply; 42+ messages in thread
From: James Bourne @ 2002-08-21 19:34 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Reed, Timothy A, linux-kernel

On Wed, 21 Aug 2002, Hugh Dickins wrote:

> You do need CONFIG_SMP and a processor capable of HyperThreading,
> i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
> just appropriate to that processor in other ways.

I was under the impression that the only CPU capable of hyperthreading was
the P4 Xeon.  Is this not correct?  I don't know of any other CPUs that
have the ht feature.

Also, looking at setup.c it's hard to determine if CONFIG_SMP is
actually required, but it doesn't look like it...

Regards
James Bourne

> 
> Hugh
> 

-- 
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
www.mtroyal.ab.ca

******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************


"There are only 10 types of people in this world: those who
understand binary and those who don't."



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 13:48 ` Hyperthreading James Bourne
@ 2002-08-21 17:33   ` Hugh Dickins
  2002-08-21 19:34     ` Hyperthreading James Bourne
  2002-08-23  7:28     ` Hyperthreading Gilad Ben-Yossef
  0 siblings, 2 replies; 42+ messages in thread
From: Hugh Dickins @ 2002-08-21 17:33 UTC (permalink / raw)
  To: James Bourne; +Cc: Reed, Timothy A, linux-kernel

On Wed, 21 Aug 2002, James Bourne wrote:
> On Wed, 21 Aug 2002, Reed, Timothy A wrote:
> > 
> > Can anyone lead me to a good source of information on what options should be
> > in the kernel for hyperthreading??  I am still fighting with a
> > sub-contractor over kernel options.
> 
> As long as you have a P4 and use the P4 support you will get
> hyperthreading with 2.4.19 (CONFIG_MPENTIUM4=y).  2.4.18 you have to also 
> turn it on with a lilo option of acpismp=force on the kernel command line.

You do need CONFIG_SMP and a processor capable of HyperThreading,
i.e. Pentium 4 XEON; but CONFIG_MPENTIUM4 is not necessary for HT,
just appropriate to that processor in other ways.

Hugh


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-08-21 11:32 Hyperthreading Reed, Timothy A
@ 2002-08-21 13:48 ` James Bourne
  2002-08-21 17:33   ` Hyperthreading Hugh Dickins
  0 siblings, 1 reply; 42+ messages in thread
From: James Bourne @ 2002-08-21 13:48 UTC (permalink / raw)
  To: Reed, Timothy A; +Cc: linux-kernel

On Wed, 21 Aug 2002, Reed, Timothy A wrote:

> Anyone,
> 
> Can anyone lead me to a good source of information on what options should be
> in the kernel for hyperthreading??  I am still fighting with a
> sub-contractor over kernel options.

As long as you have a P4 and use the P4 support you will get
hyperthreading with 2.4.19 (CONFIG_MPENTIUM4=y).  2.4.18 you have to also 
turn it on with a lilo option of acpismp=force on the kernel command line.

You might want to balance IRQs across the cpus.  Ingo Molnar has created
patches for this, which I've put on my website
at http://www.hardrock.org/kernel/.

hyperthreading will give you some performance boostes, but *only*
if you have many runable processes a majority of the time, or very heavily
threaded applications running on the system.  (an example would
be running 4 setiathome clients on a dual processor system).

regards
James Bourne

> Tim 
> 
> timothy.a.reed@lmco.com

-- 
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
www.mtroyal.ab.ca

******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************


"There are only 10 types of people in this world: those who
understand binary and those who don't."




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Hyperthreading
@ 2002-08-21 11:32 Reed, Timothy A
  2002-08-21 13:48 ` Hyperthreading James Bourne
  0 siblings, 1 reply; 42+ messages in thread
From: Reed, Timothy A @ 2002-08-21 11:32 UTC (permalink / raw)
  To: linux-kernel

Anyone,

Can anyone lead me to a good source of information on what options should be
in the kernel for hyperthreading??  I am still fighting with a
sub-contractor over kernel options.


TIA

Tim 

timothy.a.reed@lmco.com

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-18  0:31     ` Hyperthreading Martin J. Bligh
@ 2002-04-18  4:50       ` Jeff V. Merkey
  0 siblings, 0 replies; 42+ messages in thread
From: Jeff V. Merkey @ 2002-04-18  4:50 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: James Bourne, Ingo Molnar, linux-kernel

On Wed, Apr 17, 2002 at 05:31:05PM -0700, Martin J. Bligh wrote:
> >> Before you get too excited about that, how much performance boost do 
> >> you actually get by turning on Hyperthreading? ;-)
> > 
> > In my testing with SCI, it speeds up some operations and with 3Ware 
> > it increases throuput about 10 MB/S.  Not a lot but there is some 
> > improvement (if you can get around the lockups during boot).
> 
> What's that 10MB/s as a percentage of the overall performance?
> 
> M.

247-251 (with) vs. 227-238 (without) MB/S

Jeff  



^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
@ 2002-04-18  1:52 Holzrichter, Bruce
  0 siblings, 0 replies; 42+ messages in thread
From: Holzrichter, Bruce @ 2002-04-18  1:52 UTC (permalink / raw)
  To: 'Martin J. Bligh', Holzrichter, Bruce, 'Robert Love'
  Cc: James Bourne, Ingo Molnar, linux-kernel

>> (Though check Anandtech, he did a benchmark on his DB, and got a small
>> performance Decrease on a test!)

>Thanks for the pointer.

Also, it looks like the Athlon MP still stacks up quite nice in his more or
less real world benchmark, even against an pair of Hyperthreaded ZEON's.

>It sounds like a good idea in theory, but the fact that they share the TLB
>cache and other things makes me rather dubious about whether it's really
>worth it. I'm not saying it's necessarily bad, I'm just not convinced it's
good
>yet. Introducing more processors to the OS has it's own problems to deal 
>with (ones we're interested in solving anyway).

I'll bet it'll be interesting, and I agree, I was dubious about the P4 at
first anyway.. :o)  Though Hyperthreading will only be in the ZEON.   

>Real world benchmarks from people other than Intel should make interesting
>reading .... I think we need some more smarts in the OS to take real
advantage
>of this (eg using the NUMA scheduling mods to create cpu pools of 2 "procs"
>for each pair, etc) ... will be fun ;-)

>From the docs, it looks like maybe some scheduling smarts could be added.
Run Floating point ops on one Logical processor, and normal ops on the
other, and maybe some other parallelism mods.  


^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
  2002-04-17 22:48 ` Hyperthreading Martin J. Bligh
@ 2002-04-18  1:21   ` James Bourne
  0 siblings, 0 replies; 42+ messages in thread
From: James Bourne @ 2002-04-18  1:21 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Holzrichter, Bruce, 'Robert Love', Ingo Molnar, linux-kernel

On Wed, 17 Apr 2002, Martin J. Bligh wrote:

> > I've seen some Intel bench's and they are specing an increase of 0% to 30%
> 
> I think I'd be less cynical about benchmark results that didn't come from the
> people trying to sell  the product ;-)
> 
[...]
> Real world benchmarks from people other than Intel should make interesting
> reading .... I think we need some more smarts in the OS to take real advantage
> of this (eg using the NUMA scheduling mods to create cpu pools of 2 "procs"
> for each pair, etc) ... will be fun ;-)

Well, here I have some.

The tests involved kernel compiled (2.4.18) from a make mrproper, single
nbench, and unixbench (likely the most useful).

The output from tests can be found at http://www.hardrock.org/HT-results/

Results consist of (all with hyperthreading on and off):
o timed make bzImage and make modules using -j2 -j4 and -j6.
o BYTEmark output (single run)
o BYTE UNIX Benchmarks (Version 4.1.0) log, report, and times
o output from /proc/cpu
o output from /proc/interrupts
o output from dmesg (sorry, one of them has the top clipped).
o output from lspci -v

>From the results what I see is that if you are running a system with
many concurrent tasks then hyperthreading makes sense.  Many
concurrent systems (the -j4 and -j6 kernel compiles for example)
do see improvements.  Although this is not a very analytical test, I don't
have time for 10 iterations of each to get a better set of numbers.

Thanks to all and regards,
James Bourne


> 
> M.
> 

-- 
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
www.mtroyal.ab.ca

******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 21:26   ` Hyperthreading Jeff V. Merkey
@ 2002-04-18  0:31     ` Martin J. Bligh
  2002-04-18  4:50       ` Hyperthreading Jeff V. Merkey
  0 siblings, 1 reply; 42+ messages in thread
From: Martin J. Bligh @ 2002-04-18  0:31 UTC (permalink / raw)
  To: Jeff V. Merkey; +Cc: James Bourne, Ingo Molnar, linux-kernel

>> Before you get too excited about that, how much performance boost do 
>> you actually get by turning on Hyperthreading? ;-)
> 
> In my testing with SCI, it speeds up some operations and with 3Ware 
> it increases throuput about 10 MB/S.  Not a lot but there is some 
> improvement (if you can get around the lockups during boot).

What's that 10MB/s as a percentage of the overall performance?

M.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
  2002-04-17 20:34 Hyperthreading Holzrichter, Bruce
@ 2002-04-17 22:48 ` Martin J. Bligh
  2002-04-18  1:21   ` Hyperthreading James Bourne
  0 siblings, 1 reply; 42+ messages in thread
From: Martin J. Bligh @ 2002-04-17 22:48 UTC (permalink / raw)
  To: Holzrichter, Bruce, 'Robert Love'
  Cc: James Bourne, Ingo Molnar, linux-kernel

> I've seen some Intel bench's and they are specing an increase of 0% to 30%

I think I'd be less cynical about benchmark results that didn't come from the
people trying to sell  the product ;-)

> (Though check Anandtech, he did a benchmark on his DB, and got a small
> performance Decrease on a test!)

;-)
Thanks for the pointer.

> After looking at the Hyperthreading Doc's, It looks like they are trying to
> utilize some of the idle time the Execution engine has while waiting for
> other ops to happen,  Trace code misses, and such.  Strap on an extra
> processor state, and get some extra oomph.  Hey, the P4 can use all the
> extra oomph it can get!

It sounds like a good idea in theory, but the fact that they share the TLB
cache and other things makes me rather dubious about whether it's really
worth it. I'm not saying it's necessarily bad, I'm just not convinced it's good
yet. Introducing more processors to the OS has it's own problems to deal 
with (ones we're interested in solving anyway).

Real world benchmarks from people other than Intel should make interesting
reading .... I think we need some more smarts in the OS to take real advantage
of this (eg using the NUMA scheduling mods to create cpu pools of 2 "procs"
for each pair, etc) ... will be fun ;-)

M.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 21:10 ` Hyperthreading Martin J. Bligh
                     ` (2 preceding siblings ...)
  2002-04-17 21:26   ` Hyperthreading Jeff V. Merkey
@ 2002-04-17 22:12   ` Alan Cox
  3 siblings, 0 replies; 42+ messages in thread
From: Alan Cox @ 2002-04-17 22:12 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: James Bourne, Ingo Molnar, linux-kernel

> > And, you've gotta like this line:
> > Total of 4 processors activated (14299.95 BogoMIPS).
> 
> Before you get too excited about that, how much performance boost do 
> you actually get by turning on Hyperthreading? ;-)

10-30% typically. I've actually seen code where you can't measure the
improvement because the main cpu code path is precision tuned to the 
cache...

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 21:10 ` Hyperthreading Martin J. Bligh
  2002-04-17 20:15   ` Hyperthreading Robert Love
  2002-04-17 20:25   ` Hyperthreading James Bourne
@ 2002-04-17 21:26   ` Jeff V. Merkey
  2002-04-18  0:31     ` Hyperthreading Martin J. Bligh
  2002-04-17 22:12   ` Hyperthreading Alan Cox
  3 siblings, 1 reply; 42+ messages in thread
From: Jeff V. Merkey @ 2002-04-17 21:26 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: James Bourne, Ingo Molnar, linux-kernel

On Wed, Apr 17, 2002 at 02:10:52PM -0700, Martin J. Bligh wrote:
> > That has balanced the timer irqs.  I've also enabled hyper threading
> > (append="acpismp=force").
> > ...
> > And, you've gotta like this line:
> > Total of 4 processors activated (14299.95 BogoMIPS).
> 
> Before you get too excited about that, how much performance boost do 
> you actually get by turning on Hyperthreading? ;-)
> 

In my testing with SCI, it speeds up some operations and with 3Ware 
it increases throuput about 10 MB/S.  Not a lot but there is some 
improvement (if you can get around the lockups during boot).

Jeff


> M.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 20:15   ` Hyperthreading Robert Love
  2002-04-17 20:23     ` Hyperthreading Dave Jones
@ 2002-04-17 21:24     ` Jeff V. Merkey
  1 sibling, 0 replies; 42+ messages in thread
From: Jeff V. Merkey @ 2002-04-17 21:24 UTC (permalink / raw)
  To: Robert Love; +Cc: Martin J. Bligh, James Bourne, Ingo Molnar, linux-kernel



Beware!  I have seen lockups and driver sickness with hyperthreading 
enabled on some motherboards.  Most notably, Tyan with 2.4.19 and
2.5.6.  


Jeff

On Wed, Apr 17, 2002 at 04:15:42PM -0400, Robert Love wrote:
> On Wed, 2002-04-17 at 17:10, Martin J. Bligh wrote:
> > > Total of 4 processors activated (14299.95 BogoMIPS).
> > 
> > Before you get too excited about that, how much performance boost do 
> > you actually get by turning on Hyperthreading? ;-)
> 
> Certainly not the mips*4 that bogomips is showing :)
> 
> I guess that is a "bug" ?
> 
> 	Robert Love
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Hyperthreading
  2002-04-17 20:02 SMP P4 APIC/interrupt balancing James Bourne
@ 2002-04-17 21:10 ` Martin J. Bligh
  2002-04-17 20:15   ` Hyperthreading Robert Love
                     ` (3 more replies)
  0 siblings, 4 replies; 42+ messages in thread
From: Martin J. Bligh @ 2002-04-17 21:10 UTC (permalink / raw)
  To: James Bourne, Ingo Molnar; +Cc: linux-kernel

> That has balanced the timer irqs.  I've also enabled hyper threading
> (append="acpismp=force").
> ...
> And, you've gotta like this line:
> Total of 4 processors activated (14299.95 BogoMIPS).

Before you get too excited about that, how much performance boost do 
you actually get by turning on Hyperthreading? ;-)

M.


^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: Hyperthreading
@ 2002-04-17 20:34 Holzrichter, Bruce
  2002-04-17 22:48 ` Hyperthreading Martin J. Bligh
  0 siblings, 1 reply; 42+ messages in thread
From: Holzrichter, Bruce @ 2002-04-17 20:34 UTC (permalink / raw)
  To: 'Robert Love', Martin J. Bligh
  Cc: James Bourne, Ingo Molnar, linux-kernel

> On Wed, 2002-04-17 at 17:10, Martin J. Bligh wrote:
> > > Total of 4 processors activated (14299.95 BogoMIPS).
> > 
> > Before you get too excited about that, how much performance 
> boost do 
> > you actually get by turning on Hyperthreading? ;-)

I've seen some Intel bench's and they are specing an increase of 0% to 30%
(Though check Anandtech, he did a benchmark on his DB, and got a small
performance Decrease on a test!)

After looking at the Hyperthreading Doc's, It looks like they are trying to
utilize some of the idle time the Execution engine has while waiting for
other ops to happen,  Trace code misses, and such.  Strap on an extra
processor state, and get some extra oomph.  Hey, the P4 can use all the
extra oomph it can get!

B.

 

 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 21:10 ` Hyperthreading Martin J. Bligh
  2002-04-17 20:15   ` Hyperthreading Robert Love
@ 2002-04-17 20:25   ` James Bourne
  2002-04-17 21:26   ` Hyperthreading Jeff V. Merkey
  2002-04-17 22:12   ` Hyperthreading Alan Cox
  3 siblings, 0 replies; 42+ messages in thread
From: James Bourne @ 2002-04-17 20:25 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Ingo Molnar, linux-kernel

On Wed, 17 Apr 2002, Martin J. Bligh wrote:

> > That has balanced the timer irqs.  I've also enabled hyper threading
> > (append="acpismp=force").
> > ...
> > And, you've gotta like this line:
> > Total of 4 processors activated (14299.95 BogoMIPS).
> 
> Before you get too excited about that, how much performance boost do 
> you actually get by turning on Hyperthreading? ;-)

Well, that's something I'm working on finding out.

But, you have to like the looks of it!

James

> 
> M.
> 

-- 
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
www.mtroyal.ab.ca

******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 20:15   ` Hyperthreading Robert Love
@ 2002-04-17 20:23     ` Dave Jones
  2002-04-17 21:24     ` Hyperthreading Jeff V. Merkey
  1 sibling, 0 replies; 42+ messages in thread
From: Dave Jones @ 2002-04-17 20:23 UTC (permalink / raw)
  To: Robert Love; +Cc: Martin J. Bligh, James Bourne, Ingo Molnar, linux-kernel

On Wed, Apr 17, 2002 at 04:15:42PM -0400, Robert Love wrote:
 > > > Total of 4 processors activated (14299.95 BogoMIPS).
 > Certainly not the mips*4 that bogomips is showing :)
 > I guess that is a "bug" ?

Well, it justifies a comment in arch/i386/kernel/smpboot.c

1181     /*
1182      * Allow the user to impress friends.
1183      */

8-)

    Dave.

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: Hyperthreading
  2002-04-17 21:10 ` Hyperthreading Martin J. Bligh
@ 2002-04-17 20:15   ` Robert Love
  2002-04-17 20:23     ` Hyperthreading Dave Jones
  2002-04-17 21:24     ` Hyperthreading Jeff V. Merkey
  2002-04-17 20:25   ` Hyperthreading James Bourne
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 42+ messages in thread
From: Robert Love @ 2002-04-17 20:15 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: James Bourne, Ingo Molnar, linux-kernel

On Wed, 2002-04-17 at 17:10, Martin J. Bligh wrote:
> > Total of 4 processors activated (14299.95 BogoMIPS).
> 
> Before you get too excited about that, how much performance boost do 
> you actually get by turning on Hyperthreading? ;-)

Certainly not the mips*4 that bogomips is showing :)

I guess that is a "bug" ?

	Robert Love



^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2003-12-01 10:57 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-25  9:44 hyperthreading Gábor Lénárt
2003-11-25  9:48 ` hyperthreading Emiliano 'AlberT' Gabrielli
2003-11-25 10:05   ` hyperthreading Gábor Lénárt
2003-11-25 10:16     ` hyperthreading Arjan van de Ven
2003-11-25 10:32     ` hyperthreading Måns Rullgård
2003-11-25 10:45       ` hyperthreading Mikael Pettersson
2003-11-29 13:29   ` hyperthreading Bill Davidsen
2003-12-01 10:53     ` hyperthreading Emiliano 'AlberT' Gabrielli
2003-11-25 10:22 ` hyperthreading Karl Pitrich
  -- strict thread matches above, loose matches on Subject: below --
2002-08-22 12:58 Hyperthreading Nir Soffer
2002-08-22 14:30 ` Hyperthreading Hugh Dickins
2002-08-22  9:15 Hyperthreading Marc Dietrich
2002-08-22 14:06 ` Hyperthreading Hugh Dickins
2002-08-22 14:36   ` Hyperthreading Marc Dietrich
2002-08-21 22:56 Hyperthreading Nakajima, Jun
2002-08-21 23:45 ` Hyperthreading Alan Cox
2002-08-21 11:32 Hyperthreading Reed, Timothy A
2002-08-21 13:48 ` Hyperthreading James Bourne
2002-08-21 17:33   ` Hyperthreading Hugh Dickins
2002-08-21 19:34     ` Hyperthreading James Bourne
2002-08-21 21:16       ` Hyperthreading Kelsey Hudson
2002-08-21 21:55         ` Hyperthreading Banai Zoltan
2002-08-22  8:05           ` Hyperthreading venom
2002-08-26 19:00           ` Hyperthreading Kelsey Hudson
2002-08-22  8:00         ` Hyperthreading venom
2002-08-23  7:28     ` Hyperthreading Gilad Ben-Yossef
2002-08-23  8:10       ` Hyperthreading Hugh Dickins
2002-08-23  8:27         ` Hyperthreading Alan Cox
2002-08-23  8:12       ` Hyperthreading venom
2002-04-18  1:52 Hyperthreading Holzrichter, Bruce
2002-04-17 20:34 Hyperthreading Holzrichter, Bruce
2002-04-17 22:48 ` Hyperthreading Martin J. Bligh
2002-04-18  1:21   ` Hyperthreading James Bourne
2002-04-17 20:02 SMP P4 APIC/interrupt balancing James Bourne
2002-04-17 21:10 ` Hyperthreading Martin J. Bligh
2002-04-17 20:15   ` Hyperthreading Robert Love
2002-04-17 20:23     ` Hyperthreading Dave Jones
2002-04-17 21:24     ` Hyperthreading Jeff V. Merkey
2002-04-17 20:25   ` Hyperthreading James Bourne
2002-04-17 21:26   ` Hyperthreading Jeff V. Merkey
2002-04-18  0:31     ` Hyperthreading Martin J. Bligh
2002-04-18  4:50       ` Hyperthreading Jeff V. Merkey
2002-04-17 22:12   ` Hyperthreading Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).