[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274787095.5882.949.camel@twins>
Date: Tue, 25 May 2010 13:31:35 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Amit K. Arora" <aarora@...ux.vnet.ibm.com>
Cc: tj@...nel.org, Ingo Molnar <mingo@...e.hu>,
Srivatsa Vaddagiri <vatsa@...ibm.com>,
Gautham R Shenoy <ego@...ibm.com>,
Darren Hart <dvhltc@...ibm.com>,
Brian King <brking@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Make sure timers have migrated before killing
migration_thread
On Mon, 2010-05-24 at 15:29 +0530, Amit K. Arora wrote:
>
> Thus, since above race can never happen, is there any other issue with
> this patch ?
It doesn't seem to apply nicely...
>
> Signed-off-by: Amit Arora <aarora@...ibm.com>
> Signed-off-by: Gautham R Shenoy <ego@...ibm.com>
> ---
> diff -Nuarp linux-2.6.34.org/kernel/sched.c linux-2.6.34/kernel/sched.c
> --- linux-2.6.34.org/kernel/sched.c 2010-05-18 22:56:21.000000000 -0700
> +++ linux-2.6.34/kernel/sched.c 2010-05-18 22:58:31.000000000 -0700
> @@ -5942,14 +5942,26 @@ migration_call(struct notifier_block *nf
> cpu_rq(cpu)->migration_thread = NULL;
> break;
>
> + case CPU_POST_DEAD:
> + /*
> + * Bring the migration thread down in CPU_POST_DEAD event,
> + * since the timers should have got migrated by now and thus
> + * we should not see a deadlock between trying to kill the
> + * migration thread and the sched_rt_period_timer.
> + */
> + cpuset_lock();
> + rq = cpu_rq(cpu);
> + kthread_stop(rq->migration_thread);
> + put_task_struct(rq->migration_thread);
> + rq->migration_thread = NULL;
> + cpuset_unlock();
> + break;
> +
> case CPU_DEAD:
> case CPU_DEAD_FROZEN:
> cpuset_lock(); /* around calls to cpuset_cpus_allowed_lock() */
> migrate_live_tasks(cpu);
> rq = cpu_rq(cpu);
> - kthread_stop(rq->migration_thread);
> - put_task_struct(rq->migration_thread);
> - rq->migration_thread = NULL;
> /* Idle task back to normal (off runqueue, low prio) */
> raw_spin_lock_irq(&rq->lock);
> update_rq_clock(rq);
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists