From patchwork Wed Jan 24 00:39:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10181201 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 9811660467 for ; Wed, 24 Jan 2018 00:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 889AC2878C for ; Wed, 24 Jan 2018 00:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D6E928795; Wed, 24 Jan 2018 00:40:01 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 AD0482878C for ; Wed, 24 Jan 2018 00:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbeAXAj7 (ORCPT ); Tue, 23 Jan 2018 19:39:59 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:31656 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752705AbeAXAj7 (ORCPT ); Tue, 23 Jan 2018 19:39:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1516754918; x=1548290918; h=from:to:cc:subject:date:message-id; bh=qBtc6x9svIcZ7FO4WqbtldhSkcycpqcdvqyCaIelTgM=; b=qrAkWNMrXCrs/GnzAaBrP6CUhfWUjMmnjdf09vqgdA2SfCXQ2jW18GU6 urVVbPs0qJDJ2QuR4v2/6hzxos4ENGUst/J4Gv1K850wmwZmSrZi5NEuG ZQAAEobUxHmRzZDuIQoykQDT45FxArMAd4IWmjjmHMDemMN/WBrAczbrm Ob1o/+dOgwTnUIrRcnwDpvvVFVlXXa2dsvXrRKO+uCREckDtaQBaZrQ0S O1C7+eCbc64EUrMZTyZDVFVZA+jTMXY9+6dFqOLA4IRcfQhk/lLV2pAww +gdYnx7Z3gqiGB3cwqIfsRb1PBiSoScQ6aWJRadQJ7X3+04y0SV0Dhtit g==; X-IronPort-AV: E=Sophos;i="5.46,404,1511798400"; d="scan'208";a="166140414" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 24 Jan 2018 08:48:38 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 23 Jan 2018 16:34:54 -0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.171.236]) by uls-op-cesaip01.wdc.com with ESMTP; 23 Jan 2018 16:39:59 -0800 From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Douglas Gilbert , Hannes Reinecke , Christoph Hellwig Subject: [PATCH] scsi_debug: Use scsi-mq if it has been enabled Date: Tue, 23 Jan 2018 16:39:58 -0800 Message-Id: <20180124003958.3945-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.15.1 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 Since we want to remove the single queue code from the SCSI core at the appropriate time and since scsi-mq performs better than scsi-sq even when using only a single hardware queue, use scsi-mq if it has been enabled. Signed-off-by: Bart Van Assche Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig --- drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index a5986dae9020..40df3eea72c8 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5782,7 +5782,7 @@ static int sdebug_driver_probe(struct device * dev) } /* Decide whether to tell scsi subsystem that we want mq */ /* Following should give the same answer for each host */ - sdebug_mq_active = shost_use_blk_mq(hpnt) && (submit_queues > 1); + sdebug_mq_active = shost_use_blk_mq(hpnt); if (sdebug_mq_active) hpnt->nr_hw_queues = submit_queues;