From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbdJIEhP (ORCPT ); Mon, 9 Oct 2017 00:37:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50128 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbdJIEhO (ORCPT ); Mon, 9 Oct 2017 00:37:14 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CB62613A98 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ming.lei@redhat.com Date: Mon, 9 Oct 2017 12:36:51 +0800 From: Ming Lei To: Christoph Hellwig Cc: Jens Axboe , linux-block@vger.kernel.org, Mike Snitzer , dm-devel@redhat.com, Bart Van Assche , Laurence Oberman , Paolo Valente , Oleksandr Natalenko , Tom Nguyen , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Omar Sandoval Subject: Re: [PATCH V5 4/7] blk-mq: introduce blk_mq_dequeue_from_ctx() Message-ID: <20171009043650.GB19029@ming.t460p> References: <20170930102720.30219-1-ming.lei@redhat.com> <20170930102720.30219-5-ming.lei@redhat.com> <20171003090109.GB21184@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171003090109.GB21184@infradead.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 09 Oct 2017 04:37:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 03, 2017 at 02:01:09AM -0700, Christoph Hellwig wrote: > On Sat, Sep 30, 2017 at 06:27:17PM +0800, Ming Lei wrote: > > This function is introduced for dequeuing request > > from sw queue so that we can dispatch it in > > scheduler's way. > > > > More importantly, some SCSI devices may set > > q->queue_depth, which is a per-request_queue limit, > > and applied on pending I/O from all hctxs. This > > function is introduced for avoiding to dequeue too > > many requests from sw queue when ->dispatch isn't > > flushed completely. > > Weird commit log formatting, please use your 70+ chacters to format the > text. OK. > > > @@ -882,6 +882,44 @@ void blk_mq_flush_busy_ctxs(struct blk_mq_hw_ctx *hctx, struct list_head *list) > > } > > EXPORT_SYMBOL_GPL(blk_mq_flush_busy_ctxs); > > > > +struct dispatch_rq_data { > > + struct blk_mq_hw_ctx *hctx; > > + struct request *rq; > > +}; > > + > > +static bool dispatch_rq_from_ctx(struct sbitmap *sb, unsigned int bitnr, void *data) > > Overly long line. > > But except for that this looks ok to me except for the fact that you > just add an unused function. OK -- Ming