lkml.org 
[lkml]   [2005]   [May]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 02 May 2005 19:44:05 +1000
FromNick Piggin <>
SubjectRe: [RFC PATCH] Dynamic sched domains (v0.5)
Dinakar Guniguntala wrote:

> +void rebuild_sched_domains(cpumask_t span1, cpumask_t span2)
> +{
> +	cpumask_t change_map;
> +
> +	cpus_or(change_map, span1, span2);
> +
> +	preempt_disable();

Oh, you can't do this here, attach_domains does a synchronize_kernel.
So take it out, it doesn't do anything anyway, does it?

I suggest you also use some sort of locking to prevent concurrent rebuilds
and rebuilds racing with cpu hotplug. You could probably have a static
semaphore around rebuild_sched_domains, and take lock_cpu_hotplug here too.

Or alternatively take the semaphore in the cpu hotplug notifier as well...
Maybe both - neither are performance critical code.

-- 
SUSE Labs, Novell Inc.


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

\
 
 \ /
  Last update: 2005-05-02 11:47    [from the cache]
©2003-2008