Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-cifs@vger.kernel.org, Steve French <sfrench@samba.org>,
	Clark Williams <williams@redhat.com>,
	"Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
	Thomas Gleixner <tglx@linutronix.de>, Tejun Heo <tj@kernel.org>,
	uobergfe@redhat.com
Subject: Re: [RFC PATCH] cifs: Fix possible deadlock with cifs and work queues
Date: Wed, 19 Mar 2014 15:46:56 -0400	[thread overview]
Message-ID: <20140319154656.61e2c9fb@gandalf.local.home> (raw)
In-Reply-To: <20140319154339.44c327e3@gandalf.local.home>

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

> On Wed, 19 Mar 2014 20:34:07 +0100
> Peter Zijlstra <peterz@infradead.org> 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

  reply	other threads:[~2014-03-19 19:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 19:12 [RFC PATCH] cifs: Fix possible deadlock with cifs and work queues Steven Rostedt
     [not found] ` <20140319151252.16ed3ac6-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2014-03-19 19:34   ` Peter Zijlstra
2014-03-19 19:43     ` Steven Rostedt
2014-03-19 19:46       ` Steven Rostedt [this message]
     [not found]       ` <20140319154339.44c327e3-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2014-03-19 19:47         ` Peter Zijlstra
     [not found]     ` <20140319193407.GA11257-RM5+C6weyIYnLiPH7yDmwOa11wxjtiyuLtmvbW2Dspo@public.gmane.org>
2014-03-19 20:28       ` Tejun Heo
2014-03-20 19:28   ` Jeffrey Layton
2014-03-20 20:57     ` Steven Rostedt
     [not found]       ` <20140320165703.522c7c5c-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2014-03-20 21:02         ` Jeff Layton
2014-03-21  2:23           ` Steven Rostedt
     [not found]             ` <20140320222343.4faaa137-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2014-03-21  8:32               ` Pavel Shilovsky
     [not found]                 ` <CAKywueT4xRHZGomoPvnA9rob3FpzkPYuuUPe+vEDiOFvTbUiGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-21 11:59                   ` Jeff Layton
2014-03-21 12:17                 ` Steven Rostedt
     [not found]                   ` <20140321081706.271e390c-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2014-03-21 12:41                     ` Jeff Layton
2014-03-21 12:54                       ` Steven Rostedt
2014-03-21 15:07                       ` [PATCH v2] " Steven Rostedt
     [not found]                         ` <20140321110719.43a6b017-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2014-03-23  5:57                           ` Shirish Pargaonkar
2014-03-20 23:53   ` [RFC PATCH] " Jeff Layton
2014-03-21  2:19     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140319154656.61e2c9fb@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=lclaudio@uudg.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=sfrench@samba.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=uobergfe@redhat.com \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox