Re: [RFC PATCH] cifs: Fix possible deadlock with cifs and work queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Mar 2014 15:43:39 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Wed, 19 Mar 2014 20:34:07 +0100
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> 
> > On Wed, Mar 19, 2014 at 03:12:52PM -0400, Steven Rostedt wrote:
> > > My question to Tejun is, if we create another workqueue, to add the
> > > rdata->work to, would that prevent the above problem? Or what other
> > > fixes can we do?
> > 
> > The way I understand workqueues is that we cannot guarantee concurrency
> > like this. It tries, but there's no guarantee.
> > 
> > WQ_MAX_ACTIVE seems to be a hard upper limit of concurrent workers. So
> > given 511 other blocked works, the described problem will always happen.
> > 
> > Creating another workqueue doesn't actually create more threads.
> 
> But I noticed this:
> 
>  Before patch:
> 
> # ps aux |grep cifs
> root      3119  0.0  0.0      0     0 ?        S<   14:17   0:00 [cifsiod]
> 
>  After patch:
> 
> # ps aux |grep cifs
> root      1109  0.0  0.0      0     0 ?        S<   15:11   0:00 [cifsiod]
> root      1111  0.0  0.0      0     0 ?        S<   15:11   0:00 [cifsiord]
> 
> It looks to me that it does create new threads.
> 

Or is that just the rescuer thread? I can rewrite the patch to use
kthread_work instead too.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux