From patchwork Sat Oct 14 07:10:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10006269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C5556037E for ; Sat, 14 Oct 2017 07:11:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C5EB291A9 for ; Sat, 14 Oct 2017 07:11:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80E65291B8; Sat, 14 Oct 2017 07:11:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 541C5291B5 for ; Sat, 14 Oct 2017 07:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751097AbdJNHLD (ORCPT ); Sat, 14 Oct 2017 03:11:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36818 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbdJNHLB (ORCPT ); Sat, 14 Oct 2017 03:11:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B7FD80463; Sat, 14 Oct 2017 07:11:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1B7FD80463 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ming.lei@redhat.com Received: from ming.t460p (ovpn-12-54.pek2.redhat.com [10.72.12.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E89F16C412; Sat, 14 Oct 2017 07:10:53 +0000 (UTC) Date: Sat, 14 Oct 2017 15:10:48 +0800 From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Laurence Oberman , Paolo Valente , Oleksandr Natalenko , Tom Nguyen , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Omar Sandoval , John Garry Subject: Re: [PATCH V9 0/7] blk-mq-sched: improve sequential I/O performance Message-ID: <20171014071047.GA31154@ming.t460p> References: <20171013180532.29304-1-ming.lei@redhat.com> <03fc0b94-8463-3f3d-9d75-be3e05d88987@kernel.dk> <95fe2831-12a9-3346-5fc7-9259ff988669@kernel.dk> <3598a2f6-6305-372c-36a3-7813cbe04a77@kernel.dk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3598a2f6-6305-372c-36a3-7813cbe04a77@kernel.dk> User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 14 Oct 2017 07:11:01 +0000 (UTC) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Oct 13, 2017 at 02:23:07PM -0600, Jens Axboe wrote: > On 10/13/2017 01:21 PM, Jens Axboe wrote: > > On 10/13/2017 01:08 PM, Jens Axboe wrote: > >> On 10/13/2017 12:05 PM, Ming Lei wrote: > >>> Hi Jens, > >>> > >>> In Red Hat internal storage test wrt. blk-mq scheduler, we found that I/O > >>> performance is much bad with mq-deadline, especially about sequential I/O > >>> on some multi-queue SCSI devcies(lpfc, qla2xxx, SRP...) > >>> > >>> Turns out one big issue causes the performance regression: requests are > >>> still dequeued from sw queue/scheduler queue even when ldd's queue is > >>> busy, so I/O merge becomes quite difficult to make, then sequential IO > >>> performance degrades a lot. > >>> > >>> This issue becomes one of mains reasons for reverting default SCSI_MQ > >>> in V4.13. > >>> > >>> This 8 patches improve this situation, and brings back performance loss. > >>> > >>> With this change, SCSI-MQ sequential I/O performance is improved much, Paolo > >>> reported that mq-deadline performance improved much[2] in his dbench test > >>> wrt V2. Also performance improvement on lpfc/qla2xx was observed with V1.[1] > >>> > >>> [1] http://marc.info/?l=linux-block&m=150151989915776&w=2 > >>> [2] https://marc.info/?l=linux-block&m=150217980602843&w=2 > >> > >> I wanted to run some sanity testing on this series before committing it, > >> and unfortunately it doesn't even boot for me. Just hangs after loading > >> the kernel. Maybe an error slipped in for v8/9? > > > > Or it might be something with kyber, my laptop defaults to that. Test > > box seems to boot (which is SCSI), and nvme loads fine by default, > > but not with kyber. > > > > I don't have time to look into this more today, but the above might > > help you figure out what is going on. > > Verified that the laptop boots just fine if I remove the kyber udev > rule. This issue can be fixed by the following one line change: diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c index f58cab82105b..94df3ce99f2f 100644 --- a/block/kyber-iosched.c +++ b/block/kyber-iosched.c @@ -641,7 +641,7 @@ static bool kyber_has_work(struct blk_mq_hw_ctx *hctx) if (!list_empty_careful(&khd->rqs[i])) return true; } - return false; + return sbitmap_any_bit_set(&hctx->ctx_map); } #define KYBER_LAT_SHOW_STORE(op) \