public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
Cc: Bhaktipriya Shridhar
	<bhaktipriya96-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] IB/srp: Remove create_workqueue
Date: Mon, 20 Jun 2016 14:59:22 -0400	[thread overview]
Message-ID: <20160620185922.GQ3262@mtj.duckdns.org> (raw)
In-Reply-To: <dcee0161-3210-0cfb-c0e6-bba7259ad639-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>

Hello, Bart.

On Tue, Jun 07, 2016 at 01:00:13PM -0700, Bart Van Assche wrote:
> > > > srp_remove_wq is used for SRP target port removal work only. This work is
> > > > neither queued from inside a shrinker nor by the page writeback code so I
> > > > think it is safe to drop WQ_MEM_RECLAIM.
> > > 
> > > It should be able to use system_wq then.
> > 
> > No. I have tried that but that resulted in a deadlock.
> 
> See also commit bcc059103591 for the details.

So, create_workqueue() limits concurrency to 1 per cpu and if you have
a dependency between two work items and they get scheduled on the same
cpu they can deadlock.  system_wq doesn't have that restriction and
should be fine, AFAICS.

Thanks!

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-06-20 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 18:16 [RFC] IB/srp: Remove create_workqueue Bhaktipriya Shridhar
2016-06-07 18:32 ` Bart Van Assche
2016-06-07 19:21   ` Tejun Heo
2016-06-07 19:56     ` Bart Van Assche
2016-06-07 20:00       ` Bart Van Assche
     [not found]         ` <dcee0161-3210-0cfb-c0e6-bba7259ad639-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-06-20 18:59           ` Tejun Heo [this message]
     [not found]             ` <20160620185922.GQ3262-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2016-06-21  8:14               ` Bart Van Assche

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=20160620185922.GQ3262@mtj.duckdns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=bhaktipriya96-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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