From: Oleg Nesterov on
As I said, personally I like these changes very much. Even if I can't ack them
I'd like to add my vote.

On 03/17, Tejun Heo wrote:
>
> int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
> {
> ...
> + if (migrate_task(p, dest_cpu)) {
> + struct migration_arg arg = { p, dest_cpu };
> /* Need help from migration thread: drop lock and wait. */
> - struct task_struct *mt = rq->migration_thread;
> -
> - get_task_struct(mt);
> task_rq_unlock(rq, &flags);
> - wake_up_process(rq->migration_thread);
> - put_task_struct(mt);
> - wait_for_completion(&req.done);
> + hog_one_cpu(cpu_of(rq), migration_hog, &arg);

Afaics, this is the only change which can make a difference. If we race with
cpu_down(), set_cpus_allowed_ptr() can return before the task was actually
moved to another CPU. But this seems harmless to me.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Peter Zijlstra on
On Mon, 2010-03-29 at 15:57 +0200, Oleg Nesterov wrote:
> As I said, personally I like these changes very much. Even if I can't ack them
> I'd like to add my vote.

Well, I like what they do, but I hate the name and I don't like how we
end up with two interfaces that do pretty much the same thing, this new
hog thing and stopmachine.

I much prefer to keep the stopmachine name and make that into a usable
interface.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/