LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86: X86_HT always enable on X86_64 SMP
@ 2008-02-27 21:16 Hiroshi Shimamoto
  2008-02-27 21:26 ` Adrian Bunk
  0 siblings, 1 reply; 8+ messages in thread
From: Hiroshi Shimamoto @ 2008-02-27 21:16 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Sam Ravnborg; +Cc: linux-kernel

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

X86_HT is used for hyperthreading or multicore on 32-bit.
The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.

Unify X86_HT for hyperthreading or multicore.
Turn X86_HT on when X86_64 and SMP are enabled.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 arch/x86/Kconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5bbb385..7168437 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -174,7 +174,7 @@ config X86_64_SMP
 config X86_HT
 	bool
 	depends on SMP
-	depends on (X86_32 && !(X86_VISWS || X86_VOYAGER)) || (X86_64 && !MK8)
+	depends on (X86_32 && !(X86_VISWS || X86_VOYAGER)) || X86_64
 	default y
 
 config X86_BIOS_REBOOT
@@ -516,7 +516,7 @@ config NR_CPUS
 
 config SCHED_SMT
 	bool "SMT (Hyperthreading) scheduler support"
-	depends on (X86_64 && SMP) || (X86_32 && X86_HT)
+	depends on X86_HT
 	help
 	  SMT scheduler support improves the CPU scheduler's decision making
 	  when dealing with Intel Pentium 4 chips with HyperThreading at a
@@ -526,7 +526,7 @@ config SCHED_SMT
 config SCHED_MC
 	def_bool y
 	prompt "Multi-core scheduler support"
-	depends on (X86_64 && SMP) || (X86_32 && X86_HT)
+	depends on X86_HT
 	help
 	  Multi-core scheduler support improves the CPU scheduler's decision
 	  making when dealing with multi-core CPU chips at a cost of slightly
-- 
1.5.3.8


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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 21:16 [PATCH] x86: X86_HT always enable on X86_64 SMP Hiroshi Shimamoto
@ 2008-02-27 21:26 ` Adrian Bunk
  2008-02-27 21:30   ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2008-02-27 21:26 UTC (permalink / raw)
  To: Hiroshi Shimamoto
  Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Sam Ravnborg, linux-kernel

On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> 
> X86_HT is used for hyperthreading or multicore on 32-bit.
> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
> 
> Unify X86_HT for hyperthreading or multicore.
> Turn X86_HT on when X86_64 and SMP are enabled.

Please fix it properly instead - fiddling around with it the way you do
only asks for trouble in the future.

What we need are two different variables for:
- hyperthreading and
- multicore

> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> ---
>  arch/x86/Kconfig |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5bbb385..7168437 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -174,7 +174,7 @@ config X86_64_SMP
>  config X86_HT
>  	bool
>  	depends on SMP
> -	depends on (X86_32 && !(X86_VISWS || X86_VOYAGER)) || (X86_64 && !MK8)
> +	depends on (X86_32 && !(X86_VISWS || X86_VOYAGER)) || X86_64
>  	default y
>  
>  config X86_BIOS_REBOOT
> @@ -516,7 +516,7 @@ config NR_CPUS
>  
>  config SCHED_SMT
>  	bool "SMT (Hyperthreading) scheduler support"
> -	depends on (X86_64 && SMP) || (X86_32 && X86_HT)
> +	depends on X86_HT
>  	help
>  	  SMT scheduler support improves the CPU scheduler's decision making
>  	  when dealing with Intel Pentium 4 chips with HyperThreading at a
> @@ -526,7 +526,7 @@ config SCHED_SMT
>  config SCHED_MC
>  	def_bool y
>  	prompt "Multi-core scheduler support"
> -	depends on (X86_64 && SMP) || (X86_32 && X86_HT)
> +	depends on X86_HT
>  	help
>  	  Multi-core scheduler support improves the CPU scheduler's decision
>  	  making when dealing with multi-core CPU chips at a cost of slightly

And any proper fix should result in SCHED_SMT and SCHED_MC getting 
different dependencies.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 21:26 ` Adrian Bunk
@ 2008-02-27 21:30   ` H. Peter Anvin
  2008-02-27 21:58     ` Adrian Bunk
  2008-02-27 22:00     ` Yinghai Lu
  0 siblings, 2 replies; 8+ messages in thread
From: H. Peter Anvin @ 2008-02-27 21:30 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Hiroshi Shimamoto, Ingo Molnar, Thomas Gleixner, Sam Ravnborg,
	linux-kernel

Adrian Bunk wrote:
> On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
>> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>>
>> X86_HT is used for hyperthreading or multicore on 32-bit.
>> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
>> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
>>
>> Unify X86_HT for hyperthreading or multicore.
>> Turn X86_HT on when X86_64 and SMP are enabled.
> 
> Please fix it properly instead - fiddling around with it the way you do
> only asks for trouble in the future.
> 
> What we need are two different variables for:
> - hyperthreading and
> - multicore
> 

He does, and calls them SCHED_SMT and SCHED_MC respectively.

It's not particularly clear to me what X86_HT is meant to be used for 
anymore at all.

	-hpa

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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 21:30   ` H. Peter Anvin
@ 2008-02-27 21:58     ` Adrian Bunk
  2008-02-27 22:16       ` Hiroshi Shimamoto
  2008-02-27 22:00     ` Yinghai Lu
  1 sibling, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2008-02-27 21:58 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Hiroshi Shimamoto, Ingo Molnar, Thomas Gleixner, Sam Ravnborg,
	linux-kernel

On Wed, Feb 27, 2008 at 01:30:59PM -0800, H. Peter Anvin wrote:
> Adrian Bunk wrote:
>> On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
>>> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>>>
>>> X86_HT is used for hyperthreading or multicore on 32-bit.
>>> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
>>> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
>>>
>>> Unify X86_HT for hyperthreading or multicore.
>>> Turn X86_HT on when X86_64 and SMP are enabled.
>>
>> Please fix it properly instead - fiddling around with it the way you do
>> only asks for trouble in the future.
>>
>> What we need are two different variables for:
>> - hyperthreading and
>> - multicore
>
> He does, and calls them SCHED_SMT and SCHED_MC respectively.

These are the already existing scheduler related variables that are 
only a part of the X86_HT usages.

> It's not particularly clear to me what X86_HT is meant to be used for  
> anymore at all.

grep through the source code and you find it is sometimes used for 
hyperthreading and sometimes for multicore.

I don't care whether X86_HT gets splitted or perhaps even removed, but 
any change to it should remove the status quo of it having two different 
semantics.

> 	-hpa

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 21:30   ` H. Peter Anvin
  2008-02-27 21:58     ` Adrian Bunk
@ 2008-02-27 22:00     ` Yinghai Lu
  2008-02-27 22:31       ` Hiroshi Shimamoto
  1 sibling, 1 reply; 8+ messages in thread
From: Yinghai Lu @ 2008-02-27 22:00 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Adrian Bunk, Hiroshi Shimamoto, Ingo Molnar, Thomas Gleixner,
	Sam Ravnborg, linux-kernel

On Wed, Feb 27, 2008 at 1:30 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> Adrian Bunk wrote:
>  > On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
>  >> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>  >>
>  >> X86_HT is used for hyperthreading or multicore on 32-bit.
>  >> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
>  >> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
>  >>
>  >> Unify X86_HT for hyperthreading or multicore.
>  >> Turn X86_HT on when X86_64 and SMP are enabled.
>  >
>  > Please fix it properly instead - fiddling around with it the way you do
>  > only asks for trouble in the future.
>  >
>  > What we need are two different variables for:
>  > - hyperthreading and
>  > - multicore
>  >
>
>  He does, and calls them SCHED_SMT and SCHED_MC respectively.
>
>  It's not particularly clear to me what X86_HT is meant to be used for
>  anymore at all.

he made X86_HT can be enabled when only Opteron supported is enabled.

it should be stated in the comments.
YH

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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 21:58     ` Adrian Bunk
@ 2008-02-27 22:16       ` Hiroshi Shimamoto
  2008-02-27 22:37         ` Adrian Bunk
  0 siblings, 1 reply; 8+ messages in thread
From: Hiroshi Shimamoto @ 2008-02-27 22:16 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Sam Ravnborg, linux-kernel

Adrian Bunk wrote:
> On Wed, Feb 27, 2008 at 01:30:59PM -0800, H. Peter Anvin wrote:
>> Adrian Bunk wrote:
>>> On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
>>>> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>>>>
>>>> X86_HT is used for hyperthreading or multicore on 32-bit.
>>>> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
>>>> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
>>>>
>>>> Unify X86_HT for hyperthreading or multicore.
>>>> Turn X86_HT on when X86_64 and SMP are enabled.
>>> Please fix it properly instead - fiddling around with it the way you do
>>> only asks for trouble in the future.
>>>
>>> What we need are two different variables for:
>>> - hyperthreading and
>>> - multicore
>> He does, and calls them SCHED_SMT and SCHED_MC respectively.
> 
> These are the already existing scheduler related variables that are 
> only a part of the X86_HT usages.
> 
>> It's not particularly clear to me what X86_HT is meant to be used for  
>> anymore at all.
> 
> grep through the source code and you find it is sometimes used for 
> hyperthreading and sometimes for multicore.
> 
> I don't care whether X86_HT gets splitted or perhaps even removed, but 
> any change to it should remove the status quo of it having two different 
> semantics.

OK, you say "Don't mix two different semantics into one variable X86_HT", right?

Thanks,
Hiroshi Shimamoto

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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 22:00     ` Yinghai Lu
@ 2008-02-27 22:31       ` Hiroshi Shimamoto
  0 siblings, 0 replies; 8+ messages in thread
From: Hiroshi Shimamoto @ 2008-02-27 22:31 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: H. Peter Anvin, Adrian Bunk, Ingo Molnar, Thomas Gleixner,
	Sam Ravnborg, linux-kernel

Yinghai Lu wrote:
> On Wed, Feb 27, 2008 at 1:30 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>> Adrian Bunk wrote:
>>  > On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
>>  >> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>>  >>
>>  >> X86_HT is used for hyperthreading or multicore on 32-bit.
>>  >> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
>>  >> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
>>  >>
>>  >> Unify X86_HT for hyperthreading or multicore.
>>  >> Turn X86_HT on when X86_64 and SMP are enabled.
>>  >
>>  > Please fix it properly instead - fiddling around with it the way you do
>>  > only asks for trouble in the future.
>>  >
>>  > What we need are two different variables for:
>>  > - hyperthreading and
>>  > - multicore
>>  >
>>
>>  He does, and calls them SCHED_SMT and SCHED_MC respectively.
>>
>>  It's not particularly clear to me what X86_HT is meant to be used for
>>  anymore at all.
> 
> he made X86_HT can be enabled when only Opteron supported is enabled.

yes on 64-bit. On 32-bit MK8 doesn't affect X86_HT.


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

* Re: [PATCH] x86: X86_HT always enable on X86_64 SMP
  2008-02-27 22:16       ` Hiroshi Shimamoto
@ 2008-02-27 22:37         ` Adrian Bunk
  0 siblings, 0 replies; 8+ messages in thread
From: Adrian Bunk @ 2008-02-27 22:37 UTC (permalink / raw)
  To: Hiroshi Shimamoto
  Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Sam Ravnborg, linux-kernel

On Wed, Feb 27, 2008 at 02:16:56PM -0800, Hiroshi Shimamoto wrote:
> Adrian Bunk wrote:
> > On Wed, Feb 27, 2008 at 01:30:59PM -0800, H. Peter Anvin wrote:
> >> Adrian Bunk wrote:
> >>> On Wed, Feb 27, 2008 at 01:16:30PM -0800, Hiroshi Shimamoto wrote:
> >>>> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> >>>>
> >>>> X86_HT is used for hyperthreading or multicore on 32-bit.
> >>>> The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
> >>>> And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.
> >>>>
> >>>> Unify X86_HT for hyperthreading or multicore.
> >>>> Turn X86_HT on when X86_64 and SMP are enabled.
> >>> Please fix it properly instead - fiddling around with it the way you do
> >>> only asks for trouble in the future.
> >>>
> >>> What we need are two different variables for:
> >>> - hyperthreading and
> >>> - multicore
> >> He does, and calls them SCHED_SMT and SCHED_MC respectively.
> > 
> > These are the already existing scheduler related variables that are 
> > only a part of the X86_HT usages.
> > 
> >> It's not particularly clear to me what X86_HT is meant to be used for  
> >> anymore at all.
> > 
> > grep through the source code and you find it is sometimes used for 
> > hyperthreading and sometimes for multicore.
> > 
> > I don't care whether X86_HT gets splitted or perhaps even removed, but 
> > any change to it should remove the status quo of it having two different 
> > semantics.
> 
> OK, you say "Don't mix two different semantics into one variable X86_HT", right?

Exactly.

This mixing is not your fault since it's an older problem, but instead 
of your suggested patch we should fix it properly.

> Thanks,
> Hiroshi Shimamoto

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2008-02-27 22:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27 21:16 [PATCH] x86: X86_HT always enable on X86_64 SMP Hiroshi Shimamoto
2008-02-27 21:26 ` Adrian Bunk
2008-02-27 21:30   ` H. Peter Anvin
2008-02-27 21:58     ` Adrian Bunk
2008-02-27 22:16       ` Hiroshi Shimamoto
2008-02-27 22:37         ` Adrian Bunk
2008-02-27 22:00     ` Yinghai Lu
2008-02-27 22:31       ` Hiroshi Shimamoto

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