From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 19 Oct 2016 15:23:21 +0200 From: Christoph Hellwig To: Bart Van Assche Subject: Re: [PATCH v3 04/11] blk-mq: Introduce blk_mq_quiesce_queue() Message-ID: <20161019132321.GD6323@lst.de> References: MIME-Version: 1.0 In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Busch , Ming Lin , James Bottomley , "Martin K. Petersen" , Mike Snitzer , "linux-rdma@vger.kernel.org" , "linux-nvme@lists.infradead.org" , Jens Axboe , Doug Ledford , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , Laurence Oberman , Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+axboe=kernel.dk@lists.infradead.org List-ID: > +/** > + * blk_mq_quiesce_queue() - wait until all ongoing queue_rq calls have finished > + * > + * Note: this function does not prevent that the struct request end_io() > + * callback function is invoked. Additionally, it is not prevented that > + * new queue_rq() calls occur unless the queue has been stopped first. > + */ > +void blk_mq_quiesce_queue(struct request_queue *q) If this is intended to be a kerneldoc comment you need to document the 'q' parameter. If not you should drop the magic "/**" marker. > +static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) > +{ > + int srcu_idx; > + > + WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) && > + cpu_online(hctx->next_cpu)); > + > + if (!(hctx->flags & BLK_MQ_F_BLOCKING)) { > + rcu_read_lock(); > + blk_mq_process_rq_list(hctx); > + rcu_read_unlock(); > + } else { > + srcu_idx = srcu_read_lock(&hctx->queue_rq_srcu); > + blk_mq_process_rq_list(hctx); > + srcu_read_unlock(&hctx->queue_rq_srcu, srcu_idx); > + } > +} Can you document these synchronization changes in detail in the changelog? > +static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx, > + struct request *rq, blk_qc_t *cookie) > +{ > + if (blk_mq_hctx_stopped(hctx) || > + blk_mq_direct_issue_request(rq, cookie) != 0) > + blk_mq_insert_request(rq, false, true, true); > +} Any reason not to merge this function with blk_mq_direct_issue_request? Otherwise this change looks fine to me. _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme