lkml.org 
[lkml]   [2009]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] work_on_cpu: Use our own workqueue.
On Thu, 29 Jan 2009 12:13:32 +1030 Rusty Russell <rusty@rustcorp.com.au> wrote:

> 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.
>

hm. it's a bit of a timebomb.

y'know, the original way in which acpi-cpufreq did this is starting to
look attractive. Migrate self to that CPU then just call the dang
function. Slow, but no deadlocks (I think)?




\
 
 \ /
  Last update: 2009-01-29 03:15    [W:0.065 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site