linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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
* 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
@ 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
* 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  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 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: SMP P4 APIC/interrupt balancing
@ 2002-04-17 20:02 James Bourne
  2002-04-17 21:10 ` Hyperthreading Martin J. Bligh
  0 siblings, 1 reply; 42+ messages in thread
From: James Bourne @ 2002-04-17 20:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

On Wed, 17 Apr 2002, Ingo Molnar wrote:

> 
> On Wed, 17 Apr 2002, James Bourne wrote:
> 
> > Where would I find this separate patch?  Is there something I could do
> > some testing on?
> 
> the timer irq inbalance problem should be solved by the attached patch.

Thanks Ingo,
That has balanced the timer irqs.  I've also enabled hyper threading
(append="acpismp=force").

Here's the output from /proc/interrupts:
brynhild:bash$ cat /proc/interrupts 
           CPU0       CPU1       CPU2       CPU3       
  0:       3033       2911       2871       2880    IO-APIC-edge  timer
  1:          1          0          2          0    IO-APIC-edge  keyboard
  2:          0          0          0          0          XT-PIC  cascade
  8:          1          0          0          0    IO-APIC-edge  rtc
 18:          5          3          3          4   IO-APIC-level  aic7xxx
 19:        480        421        412        529   IO-APIC-level  eth0
 20:          5          3          4          4   IO-APIC-level  aic7xxx
 21:          5          3          4          4   IO-APIC-level  aic7xxx
 27:        588       1010        654        943   IO-APIC-level  megaraid
NMI:          0          0          0          0 
LOC:      11530      11528      11528      11466 
ERR:          0
MIS:          0

And, you've gotta like this line:
Total of 4 processors activated (14299.95 BogoMIPS).

I'm going to do some testing on it to check it's stability.
I'll let you know the results.

Thanks again and regards,
James

> 
> 	Ingo
> 

-- 
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

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 --
2002-08-21 22:56 Hyperthreading Nakajima, Jun
2002-08-21 23:45 ` Hyperthreading Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
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
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 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).