From patchwork Mon Apr 3 20:54:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9660607 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 4E7A36016C for ; Mon, 3 Apr 2017 20:54:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41AA928329 for ; Mon, 3 Apr 2017 20:54:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3642F2849A; Mon, 3 Apr 2017 20:54:35 +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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 9B06628329 for ; Mon, 3 Apr 2017 20:54:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbdDCUye (ORCPT ); Mon, 3 Apr 2017 16:54:34 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:26933 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbdDCUyd (ORCPT ); Mon, 3 Apr 2017 16:54:33 -0400 X-IronPort-AV: E=Sophos;i="5.36,271,1486396800"; d="scan'208";a="8339793" Received: from mail-sn1nam02lp0019.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.19]) by ob1.hgst.iphmx.com with ESMTP; 04 Apr 2017 04:54:33 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=o094TQjJ2QKzSjQT+e4OPpGypg88xh8bvHcfgpA1T6Q=; b=i7x7LypELV/enxORVU9kLJyaP4+DUe5otvzL7W3/pParvJM3FmX+JEnVR6uSofr2cqJhcTQf6UJ02yPDnGWfTH02zJ/jHjNbrBg1TsjfEvl+rvwzfKdlgUEZrS0WQQ4Dt0VkEww46A9c3fzhK8pjKdGReQMYoTeOJgpXlOAftT8= Received: from CY1PR0401MB1536.namprd04.prod.outlook.com (10.163.19.154) by CY1PR0401MB1534.namprd04.prod.outlook.com (10.163.19.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Mon, 3 Apr 2017 20:54:30 +0000 Received: from CY1PR0401MB1536.namprd04.prod.outlook.com ([10.163.19.154]) by CY1PR0401MB1536.namprd04.prod.outlook.com ([10.163.19.154]) with mapi id 15.01.1005.018; Mon, 3 Apr 2017 20:54:30 +0000 From: Bart Van Assche To: Jens Axboe CC: "linux-block@vger.kernel.org" Subject: [PATCH] blk-mq: Remove blk_mq_queue_data.list Thread-Topic: [PATCH] blk-mq: Remove blk_mq_queue_data.list Thread-Index: AQHSrLx9SKWA6J7otE2YZ143wQk/RA== Date: Mon, 3 Apr 2017 20:54:30 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: fb.com; dkim=none (message not signed) header.d=none; fb.com; dmarc=none action=none header.from=sandisk.com; x-originating-ip: [63.163.107.100] x-microsoft-exchange-diagnostics: 1; CY1PR0401MB1534; 7:fcDmZnCKSc0JHFYy1qAt5D+a4TdZJu6w4eNNWH9v0bRcGj+kzLsX4lFB8q4h9MuxhN6YJvdoIJ4/0+IQIJKSvttk7ffeTU/mZU6wpGtX+vDxpuWid57iKFanjuj5M2KlgogxYaZEEQJ8WsMFecvnCLzVGf9UrzgKkpb8Z4L+TD32uukmCfajZWNToxiN47SbLFkszoOPAtLBefT9vZe/DzFadUJIJFCrrsxDzlsrRRK0qC7/Qx5+IxlMhFQ229xvXb6yJguJdL1LBeOpp+929VTy3cAOXqcoPGsvE6B+wflJHn91AwPdF3R28xzFV8pxseQEQTMV9hnSgGw1hWf1tA==; 20:GxI1FcLrQ2ejxaZcc0EJOLZmHvtdWgdguSSGe3IjeZNoItWfiRV4hSaTy5RRCTSB8d7iAy9Alotaj7bVqcGap6Pd9yivOwuwO5RR24vSMpVw8V/y7jB4BXOdtJmYR8ryOIYSg/TgPHf/ZKPFQAF0+jjecfok+R4xxwlXtRZC4Ik= x-ms-office365-filtering-correlation-id: f886d3cc-a028-4efe-a15d-08d47ad3a012 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081); SRVR:CY1PR0401MB1534; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(42932892334569); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR0401MB1534; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0401MB1534; x-forefront-prvs: 0266491E90 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39850400002)(39400400002)(39860400002)(39450400003)(39840400002)(74316002)(2906002)(77096006)(7736002)(110136004)(38730400002)(305945005)(33656002)(8936002)(54356999)(6916009)(2900100001)(50986999)(7696004)(66066001)(4326008)(5660300001)(81166006)(8676002)(102836003)(53936002)(6116002)(3660700001)(86362001)(3846002)(189998001)(9686003)(55016002)(6436002)(99286003)(25786009)(3280700002)(122556002)(6506006); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0401MB1534; H:CY1PR0401MB1536.namprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2017 20:54:30.7765 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1534 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The block layer core sets blk_mq_queue_data.list but no block drivers read that member. Hence remove it and also the code that is used to set this member. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg --- block/blk-mq.c | 17 ----------------- include/linux/blk-mq.h | 1 - 2 files changed, 18 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 8fb983e6e2e4..b5580b09b4a5 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -984,17 +984,9 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list) { struct request_queue *q = hctx->queue; struct request *rq; - LIST_HEAD(driver_list); - struct list_head *dptr; int errors, queued, ret = BLK_MQ_RQ_QUEUE_OK; /* - * Start off with dptr being NULL, so we start the first request - * immediately, even if we have more pending. - */ - dptr = NULL; - - /* * Now process all the entries, sending them to the driver. */ errors = queued = 0; @@ -1026,7 +1018,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list) list_del_init(&rq->queuelist); bd.rq = rq; - bd.list = dptr; /* * Flag last if we have no more requests, or if we have more @@ -1062,13 +1053,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list) if (ret == BLK_MQ_RQ_QUEUE_BUSY) break; - - /* - * We've done the first request. If we have more than 1 - * left in the list, set dptr to defer issue. - */ - if (!dptr && list->next != list->prev) - dptr = &driver_list; } hctx->dispatched[queued_to_index(queued)]++; @@ -1451,7 +1435,6 @@ static void __blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie, struct request_queue *q = rq->q; struct blk_mq_queue_data bd = { .rq = rq, - .list = NULL, .last = 1 }; struct blk_mq_hw_ctx *hctx; diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index ebeea36ff9cd..90af6a31458d 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -81,7 +81,6 @@ struct blk_mq_tag_set { struct blk_mq_queue_data { struct request *rq; - struct list_head *list; bool last; };