stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH] block: mq flush: fix race between IPI handler and mq flush worker
Date: Wed, 21 May 2014 07:36:34 +0200	[thread overview]
Message-ID: <20140521053634.GA4764@lst.de> (raw)
In-Reply-To: <CACVXFVNP--zj_-UtygxfXk7GvSXwKm2KMKFs=h9KsrL=ZzbWVQ@mail.gmail.com>

On Wed, May 21, 2014 at 01:16:14PM +0800, Ming Lei wrote:
> I am wondering if virtio-blk is trivial block driver, :-)

It's about as simple as it gets.

> > The scsi-mq work that I plant to submit for the next merge window is
> > the prime example.
> 
> It depends if one scsi-mq req has to requeue itself with rq->requeue_work
> inside its own .softirq_done_fn. If yes, we can't put call_single_data
> and requeue_work into one union simply. From you last scsi-mq post,
> looks the request may do that if I understand correctly.

Requeueing a request from the completion handler is indeed what we'll
need with various more complete drivers.

> I think the patch is clean and simple, with documenting the special
> conflict case clearly too.

While I can't say anything against the fact that it fixes the issue
it's neither clean nor simple.

> Follows current ideas:
> 1), this patch with scsi-mq sharing abort_work together?
> 2), move requeue_work out of the union inside request
> 3), spin_lock_irqsave(&ctx->lock) everywhere and requeue
> request directly to ctx without using work

I think Jens very much wanted to avoid irq disabling in the I/O path
if possible. If we have a separate requeue list with it's separate
lock we can avoid that unless we actually have to take requests of
that requeue list.  I can look into that implementation.


  reply	other threads:[~2014-05-21  5:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 15:05 [PATCH] block: mq flush: fix race between IPI handler and mq flush worker Ming Lei
2014-05-19 15:18 ` Christoph Hellwig
2014-05-19 15:34   ` Ming Lei
2014-05-20  3:20   ` Ming Lei
2014-05-20 15:23     ` Christoph Hellwig
2014-05-21  5:16       ` Ming Lei
2014-05-21  5:36         ` Christoph Hellwig [this message]
2014-05-21  6:48           ` Ming Lei
2014-05-27 18:13             ` Christoph Hellwig
2014-05-27 18:38               ` Jens Axboe
2014-05-27 18:53                 ` Christoph Hellwig
2014-05-27 18:54                   ` Jens Axboe
2014-05-27 19:15                     ` Christoph Hellwig
2014-05-27 19:17                       ` Jens Axboe
2014-05-27 19:21                         ` Christoph Hellwig
2014-05-27 19:35                           ` Jens Axboe
2014-05-28  1:34                             ` Ming Lei
2014-05-28  2:26                               ` Jens Axboe
2014-05-28  2:31                                 ` Jens Axboe
2014-05-28  5:22                                   ` Christoph Hellwig
2014-05-28 14:08                                     ` Jens Axboe

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=20140521053634.GA4764@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tom.leiming@gmail.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;
as well as URLs for NNTP newsgroup(s).