Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bart.vanassche@sandisk.com (Bart Van Assche)
Subject: [PATCH v2 4/7] blk-mq: Introduce blk_quiesce_queue() and blk_resume_queue()
Date: Wed, 5 Oct 2016 07:46:58 -0700	[thread overview]
Message-ID: <b42d5056-c2cb-8f0f-1a65-70740605ff22@sandisk.com> (raw)
In-Reply-To: <CACVXFVO21wDRrZtB0A5qn5KEn-rjnewQxYyN_aAWoQrKSMvmig@mail.gmail.com>

On 10/04/16 21:32, Ming Lei wrote:
> On Wed, Oct 5, 2016 at 12:16 PM, Bart Van Assche
> <bart.vanassche@sandisk.com> wrote:
>> On 10/01/16 15:56, Ming Lei wrote:
>>>
>>> If we just call the rcu/srcu read lock(or the mutex) around .queue_rq(),
>>> the above code needn't to be duplicated any more.
>>
>> Can you have a look at the attached patch? That patch uses an srcu read lock
>> for all queue types, whether or not the BLK_MQ_F_BLOCKING flag has been set.
>
> That is much cleaner now.
>
>> Additionally, I have dropped the QUEUE_FLAG_QUIESCING flag. Just like
>> previous versions, this patch has been tested.
>
> I think the flag of QUEUE_FLAG_QUIESCING is still needed because we
> have to set this flag to prevent new coming .queue_rq() from being run,
> and synchronize_srcu() won't wait for completion of that at all (see
> section of 'Update-Side Primitives' in [1]).
>
> [1] https://lwn.net/Articles/202847/

Hello Ming,

How about using the existing flag BLK_MQ_S_STOPPED instead of 
introducing a new QUEUE_FLAG_QUIESCING flag? From the comment above 
blk_mq_quiesce_queue() in the patch that was attached to my previous 
e-mail: "Additionally, it is not prevented that new queue_rq() calls 
occur unless the queue has been stopped first."

Thanks,

Bart.

  reply	other threads:[~2016-10-05 14:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 23:57 [PATCH v2 0/7] Introduce blk_quiesce_queue() and blk_resume_queue() Bart Van Assche
2016-09-28 23:57 ` [PATCH v2 1/7] blk-mq: Introduce blk_mq_queue_stopped() Bart Van Assche
2016-10-05 17:50   ` Sagi Grimberg
2016-10-11 16:40   ` Christoph Hellwig
2016-09-28 23:59 ` [PATCH v2 4/7] blk-mq: Introduce blk_quiesce_queue() and blk_resume_queue() Bart Van Assche
2016-09-29  5:52   ` Hannes Reinecke
2016-09-29 21:51   ` Ming Lei
2016-09-30 15:55     ` Bart Van Assche
2016-10-01 22:56       ` Ming Lei
2016-10-05  4:16         ` Bart Van Assche
2016-10-05  4:32           ` Ming Lei
2016-10-05 14:46             ` Bart Van Assche [this message]
2016-10-05 16:11               ` Ming Lei
2016-10-05 18:14           ` Sagi Grimberg
2016-10-05 19:05             ` Bart Van Assche
2016-10-05 19:10               ` Sagi Grimberg
2016-10-05 21:08                 ` Bart Van Assche
2016-10-05 22:49                   ` Ming Lei
2016-10-05 23:00                     ` Bart Van Assche
2016-09-29  0:00 ` [PATCH v2 5/7] dm: Fix a race condition related to stopping and starting queues Bart Van Assche
2016-09-29  0:01 ` [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq Bart Van Assche
2016-09-29  5:54   ` Hannes Reinecke
2016-10-05 17:38   ` Sagi Grimberg
2016-10-05 21:51     ` Bart Van Assche
2016-10-11 16:44       ` Christoph Hellwig
2016-09-29  0:01 ` [PATCH v2 7/7] [RFC] nvme: Fix a race condition Bart Van Assche
2016-10-05 17:40   ` Sagi Grimberg
2016-10-11 16:46   ` Christoph Hellwig
2016-10-12  0:41     ` Bart Van Assche
2016-09-29  0:02 ` [PATCH v2 2/7] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code Bart Van Assche
2016-09-29  0:02 ` [PATCH v2 3/7] [RFC] nvme: " Bart Van Assche
2016-10-05 17:43   ` Sagi Grimberg

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=b42d5056-c2cb-8f0f-1a65-70740605ff22@sandisk.com \
    --to=bart.vanassche@sandisk.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