public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: tj@kernel.org, JBottomley@parallels.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH 0/3] drain_workqueue vs scsi_flush_work
Date: Fri, 02 Dec 2011 15:56:45 -0800	[thread overview]
Message-ID: <20111202235319.24470.65483.stgit@localhost6.localdomain6> (raw)

Hi Tejun, James,

While trying to use drain_workqueue() in libsas I hit the
WARN_ON_ONCE(!is_chained_work(wq)) in __queue_work().  However, as I
mention in patch-2 libsas expects that new unchained work can be
submitted during a drain.  So, patch-2 is a hack to accept new work when
drain_workqueue() is used publicly as a "stronger flush", while keeping
the same warn+drop behavior for internal usages of drain_workqueue() in
the destroy_workqueue() case.

Smoke tested on sas topoloogy of:
host-->ata
host-->expander-->ata
host-->expander-->expander-->ata

--
Dan


---

Dan Williams (3):
      workqueue: promote workqueue_lock to hard-irq safe
      workqueue: defer work to a draining queue
      scsi: use drain_workqueue

 drivers/scsi/hosts.c      |    8 ++-
 drivers/scsi/isci/host.c  |    3 -
 include/linux/workqueue.h |    3 +
 include/scsi/scsi_host.h  |    2 -
 kernel/workqueue.c        |  114 ++++++++++++++++++++++++++++++++-------------
 5 files changed, 89 insertions(+), 41 deletions(-)

             reply	other threads:[~2011-12-02 23:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 23:56 Dan Williams [this message]
2011-12-02 23:56 ` [PATCH 1/3] workqueue: promote workqueue_lock to hard-irq safe Dan Williams
2011-12-02 23:56 ` [PATCH 2/3] workqueue: defer work to a draining queue Dan Williams
2011-12-03  1:53   ` Williams, Dan J
2011-12-04  7:12   ` Dan Williams
2011-12-02 23:57 ` [PATCH 3/3] scsi: use drain_workqueue Dan Williams

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=20111202235319.24470.65483.stgit@localhost6.localdomain6 \
    --to=dan.j.williams@intel.com \
    --cc=JBottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tj@kernel.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