Skip to contentSkip to conversation

domain setup in 2.6.9rc1-bk6

DISCUSSION Andi Kleen 4 participants 5 messages Aug 31, 2004 – Sep 1, 2004 Generic include/asm header files

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

Someone deleted arch/x86_64/kernel/domain.c in current BK and moved the SMT domain setup to generic code.

Problem is that I need a architecture specific hook to turn off SMT idle for AMD dual core CPUs, which otherwise look like SMT siblings. I suppose I will do more tunings in this area in the future anyways, so having it in the architecture would be better.

It seems a bit counterintuitive that we have such a configurable scheduler, and then there is only a "one size fits all" way to configure it.

Can part of this code please be moved back to the architecture?

Thanks,

-Andi

#1 lore raw
Quoted 6 lines

Problem is that I need a architecture specific hook to turn off SMT idle for AMD dual core CPUs, which otherwise look like SMT siblings. I suppose I will do more tunings in this area in the future anyways, so having it in the architecture would be better.

From a ppc64 perspective I liked the merging of the domains code.

We could have the ability to override generic domain setup per architecture but leave all the default stuff in there.

Anton

#2 lore raw
Quoted 11 lines · Anton Blanchard
Quoted 6 lines

Problem is that I need a architecture specific hook to turn off SMT idle for AMD dual core CPUs, which otherwise look like SMT siblings. I suppose I will do more tunings in this area in the future anyways, so having it in the architecture would be better.

From a ppc64 perspective I liked the merging of the domains code.

We could have the ability to override generic domain setup per architecture but leave all the default stuff in there.

Currently all I want is to disable SD_SHARE_POWER when one flag is set. A simple way to do this would be appreciated.

Later overriding would be fine. A simple way to do this would be to declare it weak.

-Andi

#3 lore raw
Quoted 6 lines · Andi Kleen
Quoted 4 lines · Anton Blanchard
Quoted 3 lines

Problem is that I need a architecture specific hook to turn off SMT idle for AMD dual core CPUs, which otherwise look like SMT siblings. I suppose I will do more tunings
in this area in the future anyways, so having it in the architecture would be better.

Quoted 8 lines
Quoted 4 lines

From a ppc64 perspective I liked the merging of the domains code.

We could have the ability to override generic domain setup per architecture but leave all the default stuff in there.

Currently all I want is to disable SD_SHARE_POWER when one flag is set. A simple way to do this would be appreciated.

You can define ARCH_HAS_SCHED_TUNE, and define your own SD_SIBLING_INIT, SD_CPU_INIT, SD_NODE_INIT. Also, you just need to define a cpu_sibling_map in order to use CONFIG_SCHED_SMT.

Quoted 3 lines

Later overriding would be fine. A simple way to do this would be to declare it weak.

Ingo preferred to do it this way. I can't say I blame him because the setup code is not exactly something trivial that you want duplicated everywhere (although it is now much improved).

It would be simple enough to just re-export it to the arch code, however I guess I agree with tackling that when the need arises.

I think it may not be *too* difficult to even come up with a decent API to handle more arbitrary setups now. Definitely let me know when you run into a limitation, and I'll be interested in fixing it.

Thanks
Nick

#4 lore raw
Quoted 6 lines · On Wed, 01 Sep 2004 10:16:16 +1000 Nick Piggin <[email protected]> wrote:
Quoted 3 lines

Currently all I want is to disable SD_SHARE_POWER when one flag is set. A simple way to do this would be appreciated.

You can define ARCH_HAS_SCHED_TUNE, and define your own SD_SIBLING_INIT, SD_CPU_INIT, SD_NODE_INIT. Also, you just

Hmm, it seems to be evaluated at run time. That may actually work.

Basically i just need a function call to determine the flags for SD_SIBLING_INIT.

-Andi