Re: [CFT][RFC] HT scheduler
From: Rusty Russell
Date: Sat Dec 20 2003 - 19:31:58 EST
In message <3FE28529.1010003@xxxxxxxxxxxxxxx> you write:
> + * See comment for set_cpus_allowed. calling rules are different:
> + * the task's runqueue lock must be held, and __set_cpus_allowed
> + * will return with the runqueue unlocked.
Please, never *ever* do this.
Locking is probably the hardest thing to get right, and code like this
makes it harder.
Fortunately, there is a simple solution coming with the hotplug CPU
code: we need to hold the cpucontrol semaphore here anyway, against
cpus vanishing.
Perhaps we should just use that in both places.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/