Re: [PATCH 2/2] S390 topology: don't use kthread() for arch_reinit_sched_domains()

From: Max Krasnyansky
Date: Mon Jun 30 2008 - 15:49:40 EST


Paul Jackson wrote:
Max wrote:
we either have to ... or change arch_init_sched_domains() to no destroy current domains.

I might be misreading this, but I doubt that just not destroying
current domains is an option. Once any CPU goes on or off line, the
only way back to the new correct sched domain configuration is via the
rebuild_sched_domains() routine in kernel/cpuset.c.


Despite all the typos and missing words you read it correctly :). Here is what I'm thinking.
When a CPU goes off line overall partitioning does not change we just need to update current domains and remove the CPU that is no longer available. When a CPU goes online it always ends up in the root cpuset, which means it can be added to the first load-balanced sched domain.

In other words I'm thinking of simulating what rebuild_sched_domains() would've done on hotplug events and calling partition_sched_domains() directly from sched cpu hotplug code.
That way we can avoid cpuset/cgroup locking in that path.
Now, I haven't really looked into details. Maybe it's not feasible. In which case Paul M.'s new locking scheme is the way to go.

Max
--
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/