Re: current linux-2.6.git: cpusets completely broken
From: Dmitry Adamushko
Date: Sun Jul 13 2008 - 05:53:18 EST
2008/7/13 Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>:
> On Sun, 13 Jul 2008, Dmitry Adamushko wrote:
>>
>> try_to_wake_up() -> ... -> wake_idle() does not see "cpu_active_map".
>
> You're right. I missed a couple places, because that migrate code not only
> ends up using "cpu_is_offline()" instead of "!cpu_online()" (so my greps
> all failed), and because it has those online checks in multiple places.
> Grr.
>
> So it would need to change a few other "cpu_is_offline()" calls to
> "!cpu_active()" instead (in __migrate_task at a minimum).
it should have checked the result of select_task_rq() in
try_to_wake_up() or modify wake_idle() alternatively.
And let me explain one last time why I opposed your 'cpu_active_map' approach.
I do agree that there are likely ways to optimize the hotplug
machinery but I have been focused on fixing bugs in a scope of the
current framework trying to keep it intact with _minimal_ changes (as
it's probably .26 material).
The current way to synchronize with the load-balancer is to attach
NULL domains to all sched-domains upon CPU_DOWN_PREPARE and rebuild
sched-domains upon CPU_DOWN, effectively making the load-balancer
'blind' (and this way it's workable indeed). Perhaps it's an overkill
and something like being proposed by Miao or you should be
considered/tried as an alternative.
Even if we place "!cpu_active()" in all the load-balancer-related
places (btw., we can also do it with !cpu_online() / cpu_offline() as
Miao did with his initial patch) :
(1) common_cpu_mem_hotplug_unplug() -> rebuild_sched_domain() is still
called pretty "randomly" (breaking the aforementioned model). At the
very least it's an overkill;
(2) sched-domains are broken (at least while CPU_{UP,DOMS} ops. are in
progress) and in this state they are still used in a number of places.
That's just illogic;
With (2) in place, "cpu_mask_active" acts as a workaround to the
existing (broken by CPUSETS) model.
If we want "cpu_mask_active" as a primary solution, then the current
model should be altered (presumably, we don't need NULL domains any
more). Otherwise, it's kind of a strange (illogical) hybrid.
>
> Linus
>
--
Best regards,
Dmitry Adamushko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/