SCHED_ULE should not be the default
se at freebsd.org
Sat Dec 24 11:15:59 UTC 2011
Am 24.12.2011 00:02, schrieb Andriy Gapon:
> on 24/12/2011 00:49 Adrian Chadd said the following:
>> Does ULE care (much) if the nodes are hyperthreading or real cores?
>> Would that play a part in what it tries to schedule/spread?
> An answer to this part from the theory.
> ULE does care about physical topology of the (logical) CPUs.
> So, for example, four cores are not the same as two core with two hw threads
> from ULE's perspective. Still, ULE tries to eliminate any imbalances between
> the CPU groups starting from the top level (e.g. CPU packages in a multi-socket
> system) and all the way down to the individual (logical) CPUs.
> Thus, given enough load (L >= N) there should not be an idle CPU in the system
> whatever the topology. Modulo bugs, of course, as always.
I tried to locate the old message, where somebody explained why the
topology lead to a thread being selected for migration, re-assigned and
then on another topology level was swapped back and ended on just the
core it had already been running on. The analysis was quite detailed and
it may well have been part of that discussion back in 2008 that Steve
Kargl mentioned ...
This problem could be fixed by adding a slight degree if randomness.
But if IIRC, a deterministic solution might also be possible, which just
takes care not to put a thread back on the core it previously had been
running on, if it has been determined that the thread should be migrated
to a different core, before.
Sorry for not being able to point to the old message that contained the
analysis of this problem.
More information about the freebsd-stable