From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756537AbdJJS0x (ORCPT ); Tue, 10 Oct 2017 14:26:53 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:46076 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756485AbdJJS0u (ORCPT ); Tue, 10 Oct 2017 14:26:50 -0400 X-Google-Smtp-Source: AOwi7QA1L8lIWKfmQ3H3TLafwVcxXMGA7KQgwRCOwpmsbJTLUy4Bu+zSXovbymIVV7kVaHTuh0XAAA== Date: Tue, 10 Oct 2017 11:26:48 -0700 From: Omar Sandoval To: Ming Lei Cc: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , 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 V6 5/5] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed Message-ID: <20171010182648.GE30738@vader.DHCP.thefacebook.com> References: <20171009112424.30524-1-ming.lei@redhat.com> <20171009112424.30524-6-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171009112424.30524-6-ming.lei@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 09, 2017 at 07:24:24PM +0800, Ming Lei wrote: > During dispatching, we moved all requests from hctx->dispatch to > one temporary list, then dispatch them one by one from this list. > Unfortunately during this period, run queue from other contexts > may think the queue is idle, then start to dequeue from sw/scheduler > queue and still try to dispatch because ->dispatch is empty. This way > hurts sequential I/O performance because requests are dequeued when > lld queue is busy. > > This patch introduces the state of BLK_MQ_S_DISPATCH_BUSY to > make sure that request isn't dequeued until ->dispatch is > flushed. > > Reviewed-by: Bart Van Assche > Reviewed-by: Christoph Hellwig I think this will do for now. Reviewed-by: Omar Sandoval > Signed-off-by: Ming Lei > --- > block/blk-mq-debugfs.c | 1 + > block/blk-mq-sched.c | 38 ++++++++++++++++++++++++++++++++------ > block/blk-mq.c | 5 +++++ > include/linux/blk-mq.h | 1 + > 4 files changed, 39 insertions(+), 6 deletions(-)