Re: [2.6.33-rc5] Weird deadlock when shutting down

From: AmÃrico Wang
Date: Mon Feb 22 2010 - 04:12:20 EST


On Mon, Feb 22, 2010 at 5:04 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Mon, 2010-02-22 at 16:34 +0800, AmÃrico Wang wrote:
>> On Sun, Feb 21, 2010 at 7:22 PM, Johannes Berg
>> <johannes@xxxxxxxxxxxxxxxx> wrote:
>> > On Sun, 2010-02-21 at 12:14 +0100, Johannes Berg wrote:
>> >
>> >> Â Â Â Â printk("got cpu\n");
>> >> Â Â Â Â for_each_online_cpu(i) {
>> >> Â Â Â Â Â Â Â Â sm_work = per_cpu_ptr(stop_machine_work,
>> i);
>> >> Â Â Â Â Â Â Â Â INIT_WORK(sm_work, stop_cpu);
>> >> Â Â Â Â Â Â Â Â queue_work_on(i, stop_machine_wq, sm_work);
>> >> Â Â Â Â }
>> >> Â Â Â Â /* This will release the thread on our CPU. */
>> >> Â Â Â Â put_cpu();
>> >> Â Â Â Â printk("put cpu\n");
>> >
>> > As odd as that may be, it hangs in put_cpu() here.
>> >
>>
>> Hmm, does adding synchronize_sched() in _cpu_down() help?
>
> No luck.
>

Ok, thanks.

Since it hangs in put_cpu() which is just preempt_enable(), so I began
to suspect if we need a synchronize_sched(), or some barrier perhaps.
I am not sure at all.

Before other experts look at this, I think doing a bisect would be very
useful.

Again, thanks for your testing!
--
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/