linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn-l3A5Bk7waGM@public.gmane.org>
To: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>
Cc: Bart Van Assche
	<bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>,
	Jens Axboe <axboe-b10kYP2dOMg@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	James Bottomley
	<jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	"Martin K. Petersen"
	<martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Keith Busch <keith.busch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 4/9] block: Move blk_freeze_queue() and blk_unfreeze_queue() code
Date: Tue, 27 Sep 2016 09:52:13 +0200	[thread overview]
Message-ID: <20160927075213.rkpulkbrbndm2wwr@linux-x5ow.site> (raw)
In-Reply-To: <ffad7b3c-e7f5-56d7-0a75-574e65ac5b31-l3A5Bk7waGM@public.gmane.org>

On Tue, Sep 27, 2016 at 08:26:19AM +0200, Hannes Reinecke wrote:
> On 09/26/2016 08:27 PM, Bart Van Assche wrote:
> > Move the blk_freeze_queue() and blk_unfreeze_queue() implementations
> > from block/blk-mq.c to block/blk-core.c. Drop "_mq" from the name of
> > the functions that have been moved.
> > 
> > Signed-off-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
> > ---
> >  block/blk-core.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
> >  block/blk-mq.c   | 41 +++--------------------------------------
> >  block/blk.h      |  3 +++
> >  3 files changed, 51 insertions(+), 38 deletions(-)
> > 
> > diff --git a/block/blk-core.c b/block/blk-core.c
> > index b75d688..8cc8006 100644
> > --- a/block/blk-core.c
> > +++ b/block/blk-core.c
> > @@ -682,6 +682,51 @@ static void blk_queue_usage_counter_release(struct percpu_ref *ref)
> >  	wake_up_all(&q->mq_freeze_wq);
> >  }
> >  
> > +void blk_freeze_queue_start(struct request_queue *q)
> > +{
> > +	int freeze_depth;
> > +
> > +	freeze_depth = atomic_inc_return(&q->mq_freeze_depth);
> > +	if (freeze_depth == 1) {
> > +		percpu_ref_kill(&q->q_usage_counter);
> > +		blk_mq_run_hw_queues(q, false);
> > +	}
> > +}
> > +
> As you dropped the 'mq_' prefix, maybe you should rename the counter to
> 'freeze_depth', to?

See PATCH 6/9

-- 
Johannes Thumshirn                                          Storage
jthumshirn-l3A5Bk7waGM@public.gmane.org                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
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-09-27  7:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 18:25 [PATCH 0/9] Introduce blk_quiesce_queue() and blk_resume_queue() Bart Van Assche
2016-09-26 18:26 ` [PATCH 2/9] dm: Fix a race condition related to stopping and starting queues Bart Van Assche
     [not found]   ` <ba8ddc16-b709-e7fb-1120-b6e1bd393540-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-27  6:21     ` Hannes Reinecke
2016-09-27  7:47   ` Johannes Thumshirn
2016-09-26 18:27 ` [PATCH 4/9] block: Move blk_freeze_queue() and blk_unfreeze_queue() code Bart Van Assche
     [not found]   ` <f990694e-76ea-f6b1-10a4-c23b9a738b39-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-27  6:26     ` Hannes Reinecke
     [not found]       ` <ffad7b3c-e7f5-56d7-0a75-574e65ac5b31-l3A5Bk7waGM@public.gmane.org>
2016-09-27  7:52         ` Johannes Thumshirn [this message]
2016-09-26 18:28 ` [PATCH 6/9] block: Rename mq_freeze_wq and mq_freeze_depth Bart Van Assche
2016-09-27  7:51   ` Johannes Thumshirn
2016-09-26 18:28 ` [PATCH 7/9] blk-mq: Introduce blk_quiesce_queue() and blk_resume_queue() Bart Van Assche
2016-09-26 18:28 ` [PATCH 8/9] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq Bart Van Assche
2016-09-26 18:28 ` [PATCH 9/9] [RFC] nvme: Fix a race condition Bart Van Assche
2016-09-27 16:31   ` Steve Wise
2016-09-27 16:43     ` Bart Van Assche
2016-09-27 16:56       ` James Bottomley
     [not found]         ` <1474995360.2716.19.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-09-27 17:09           ` Bart Van Assche
     [not found]             ` <3fb86a78-de3a-b764-a493-cb5bc5b6d8b6-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-28 14:23               ` Steve Wise
2016-09-27 16:56       ` Steve Wise
     [not found] ` <7948dbb8-6333-dc62-2673-4da35b4dfdbc-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-26 18:26   ` [PATCH 1/9] blk-mq: Introduce blk_mq_queue_stopped() Bart Van Assche
2016-09-27  6:20     ` Hannes Reinecke
2016-09-27  7:38     ` Johannes Thumshirn
2016-09-26 18:27   ` [PATCH 3/9] [RFC] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code Bart Van Assche
2016-09-26 18:27   ` [PATCH 5/9] block: Extend blk_freeze_queue_start() to the non-blk-mq path Bart Van Assche
2016-09-27  7:50     ` Johannes Thumshirn
2016-09-27 13:22     ` Ming Lei
     [not found]       ` <CACVXFVO=GFp=ArC_FT+xPSmL84m01fX6bzReBQ8DeLQ4fUD5cQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-27 14:42         ` Bart Van Assche
     [not found]           ` <a8e8796e-7266-4c8a-a4eb-31cedf73ec8a-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-27 15:55             ` Bart Van Assche
2016-09-26 18:33   ` [PATCH 0/9] Introduce blk_quiesce_queue() and blk_resume_queue() Mike Snitzer
     [not found]     ` <20160926183308.GA13309-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-26 18:46       ` Bart Van Assche
2016-09-26 22:26       ` Bart Van Assche
2016-10-11 16:27 ` Laurence Oberman

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=20160927075213.rkpulkbrbndm2wwr@linux-x5ow.site \
    --to=jthumshirn-l3a5bk7wagm@public.gmane.org \
    --cc=axboe-b10kYP2dOMg@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hare-l3A5Bk7waGM@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=keith.busch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nvme-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=snitzer-H+wXaHxf7aLQT0dZR+AlfA@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;
as well as URLs for NNTP newsgroup(s).