From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:56976 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757230AbdDSBKm (ORCPT ); Tue, 18 Apr 2017 21:10:42 -0400 Date: Wed, 19 Apr 2017 09:10:31 +0800 From: Ming Lei To: Omar Sandoval Cc: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , Omar Sandoval , Jozef Mikovic Subject: Re: [PATCH 0/4] blk-mq-sched: allow to use hw tag for sched Message-ID: <20170419011030.GC16634@ming.t460p> References: <20170415123825.32716-1-ming.lei@redhat.com> <20170416160352.GA6349@ming.t460p> <20170417173046.GA27028@vader.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20170417173046.GA27028@vader.DHCP.thefacebook.com> Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org On Mon, Apr 17, 2017 at 10:30:46AM -0700, Omar Sandoval wrote: > On Mon, Apr 17, 2017 at 12:03:53AM +0800, Ming Lei wrote: > > On Sat, Apr 15, 2017 at 08:38:21PM +0800, Ming Lei wrote: > > > The 1st patch enhances BLK_MQ_F_NO_SCHED so that we can't change/ > > > show available io schedulers on devices which don't support io > > > scheduler. > > > > > > The 2nd patch passes BLK_MQ_F_NO_SCHED for avoiding one regression > > > on mtip32xx, which is introduced by blk-mq io scheduler. > > > > > > The last two patches introduce BLK_MQ_F_SCHED_USE_HW_TAG so that > > > we can allow to use hardware tag for scheduler, then mq-deadline > > > can work well on mtip32xx. Even though other devices with enough > > > hardware tag space can benefit from this feature too. > > > > > > The 1st two patches aims on v4.11, and the last two are for > > > v4.12. > > > > Please ignore this patchset, and I will post another serial for > > mtip32xx fix. > > > > thanks, > > Ming > > Regardless of the mtip32xx fix, I actually wanted to skip the scheduler > tags when possible just for performance reasons. I don't think that > should be a device-specific setting. We can let the I/O scheduler decide > how many tags it wants, and if the device has at least that many tags, > just use the hardware tags directly. I'll probably look at doing that > for 4.13, we'll see if it actually makes a performance difference. Yes, I thought about that too, the following policy may be applied at default: - if queue depth is not less than q->nr_requests and - the tag space isn't shared We still can keep the flag of BLK_MQ_F_SCHED_USE_HW_TAG so that drivers can decide if they want to do that, since I guess it may help some shared tag cases too. Now the mtip32xx fix has been sent out already, I will post this patchset of using hw tag for scheduler out soon for review. Thanks, Ming