> On Mon, Apr 21, 2003 at 03:13:31PM -0400, Ingo Molnar wrote:
>
> > +/*
> > + * Is there a way to do this via Kconfig?
> > + */
> > +#if CONFIG_NR_SIBLINGS_2
> > +# define CONFIG_NR_SIBLINGS 2
> > +#elif CONFIG_NR_SIBLINGS_4
> > +# define CONFIG_NR_SIBLINGS 4
> > +#else
> > +# define CONFIG_NR_SIBLINGS 0
> > +#endif
> > +
>
> Maybe this would be better resolved at runtime ?
> With the above patch, you'd need three seperate kernel images
> to run optimally on a system in each of the cases.
> The 'vendor kernel' scenario here looks ugly to me.
>
> > +#if CONFIG_NR_SIBLINGS
> > +# define CONFIG_SHARE_RUNQUEUE 1
> > +#else
> > +# define CONFIG_SHARE_RUNQUEUE 0
> > +#endif
>
> And why can't this just be a
>
> if (ht_enabled)
> shared_runqueue = 1;
>
> Dumping all this into the config system seems to be the
> wrong direction IMHO. The myriad of runtime knobs in the
> scheduler already is bad enough, without introducing
> compile time ones as well.
May I add my "I don't understand this, either" at this point? It seems
desirable to have this particular value determined at runtime.
On Tue, 22 Apr 2003, Ingo Molnar wrote:
>
> On Tue, 22 Apr 2003, Rick Lindsley wrote:
> > [...] Are we assuming that because both a physical processor and its
> > sibling are not idle, that it is better to move a task from the sibling
> > to a physical processor? In other words, we are presuming that the case
> > where the task on the physical processor and the task(s) on the
> > sibling(s) are actually benefitting from the relationship is rare?
>
> yes. This 'un-sharing' of contexts happens unconditionally, whenever we
> notice the situation. (ie. whenever a CPU goes completely idle and notices
> an overloaded physical CPU.) On the HT system i have i have measure this
> to be a beneficial move even for the most trivial things like infinite
> loop-counting.
>
> the more per-logical-CPU cache a given SMT implementation has, the less
> beneficial this move becomes - in that case the system should rather be
> set up as a NUMA topology and scheduled via the NUMA scheduler.
Have you done any tests with a threaded process running on a single CPU in
the siblings? If they are sharing data and locks in the same cache it's
not obvious (to me at least) that it would be faster in two CPUs having to
do updates. That's a question, not an implication that it is significantly
better in just one, a threaded program with only two threads is not as
likely to be doing the same thing in both, perhaps.
-- bill davidsen <davidsen@tmr.com> CTO, TMR Associates, Inc Doing interesting things with little computers since 1979.- 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/