Re: [PATCH 2/3] work_on_cpu: Use our own workqueue.

From: Rusty Russell
Date: Wed Jan 28 2009 - 20:43:52 EST


On Thursday 29 January 2009 06:14:40 Andrew Morton wrote:
> It's vulnerable to the same deadlock, I think? Suppose we have:
...
> - A calls work_on_cpu() and takes woc_mutex.
>
> - Before function_which_takes_L() has started to execute, task B takes L
> then calls work_on_cpu() and task B blocks on woc_mutex.
>
> - Now function_which_takes_L() runs, and blocks on L

Agreed, but now it's a fairly simple case. Both sides have to take lock L, and both have to call work_on_cpu.

Workqueues are more generic and widespread, and an amazing amount of stuff gets called from them. That's why I felt uncomfortable with removing the one known problematic caller.

Thanks,
Rusty.
--
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/