Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3786567pxb; Tue, 7 Sep 2021 07:34:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGlTb4vlsMX37NI1bg2/YtZVFLwlXf7EunGHxEQCNXLv12SH00JE6WABBy9UNQPHjcnzYR X-Received: by 2002:adf:d1b2:: with SMTP id w18mr19970673wrc.6.1631025278610; Tue, 07 Sep 2021 07:34:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631025278; cv=pass; d=google.com; s=arc-20160816; b=WHwJb3cAL7vk/tLQP3ptVzpJSIi3+hFIHdJ35+ROgReDc6rmj4ygkT7gPIAp+vF54X AfARIJvXFlZG1uEIOUWTBADuiZE1aT6QRq8hARRpetTybBHsiJ5bwKIG9CTE0L0KHMlT pLtL7y9gjfTWgu+O2dooW5GSmE/0eVe79RcIE0jYe5kXg7LWKtzKSqW/FEK6hAFeT18F nqeQvoIk3QVbVxcYPQ6EIYNLxX4g9qJCJjoDdy9//6kLtHpUA9iFmi5L+hOrLsU2v4jy dizpH77BmHeib7rUjzHbPD0y/ff5p+1WFP7fNW+jxd4BJhWUHfTaOphJoot3Vy52lTW7 R6tQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:dkim-signature; bh=uOY78QPH6YwX0qHjo/C9tjIsWS3wkLb3W2wzAeqjYf4=; b=scNCOrdMhFX/yEFiW1f3eZrwa3vJD6EyXCjE0vBqksB+GvPIVcj7tlivf+ZUQMjyMq E111CV9XsEnMaZU6lzke2On3bYOhsKv0ToJ5Aa5AzcTwZR2ApXys3kLwDEP0u0Ptf9lb p/VdKBxmYA6XpUuJ3c9T93SfglBkgBGVdZHgf80avQGsX7harbF9qJZKtqJFd+Stwaew c4JL12iXGwYnJ0fI1/cXYNRM6nJgSnKvqo79RmgD1h3xwozU/ZFTD8utIiWey1FpEeEE zL6yMB+pA4zat+Lgbgxbsch2fsfoWc6w+wHq1XkZjdA/CBqOVnOVgdoLsLX1JRbdpAhC Lm/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=cqXRzvFk; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=eKhpHvkn; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si11211223edt.402.2021.09.07.07.34.13; Tue, 07 Sep 2021 07:34:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=cqXRzvFk; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=eKhpHvkn; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239100AbhIGOXG (ORCPT + 99 others); Tue, 7 Sep 2021 10:23:06 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:17679 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237973AbhIGOXD (ORCPT ); Tue, 7 Sep 2021 10:23:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1631024517; x=1662560517; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=8Sgz/gGlnMD8XyPNt5y7peU1arQEbdMxWoyt1ocbzhI=; b=cqXRzvFk/dxaUwwIrHjkciegzGP/1jcrDfh9B1CDsXv92Yfg56yTlaM3 Bx5YORR0H7fsEmh6GjyrMX0GkgRw1vRDg0FNWVRHann/Cxem9CghaWbs5 Z/tbHfqdyO/tr2yDRSTRfZ4TE+PeHn9HmEwnjX+XEufVIdTuji1K/iW/g bG4fkB+DVUTk5ntGPYaB2QSrYBwIDq6IE6ZJCGO8MlIG3pmkDkbgkIIra AOj6oTqRM5QlN7VBMfdM3lrX+pmelYri3Q09UyPhuvOL9WBpIfMaFIexK 2H7MxcV3BVKpDyi22aa49AxXyQZOfDCurGfbSKYhdBuBVpYT6IFa/YgOJ g==; X-IronPort-AV: E=Sophos;i="5.85,274,1624291200"; d="scan'208";a="184162953" Received: from mail-mw2nam10lp2104.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.104]) by ob1.hgst.iphmx.com with ESMTP; 07 Sep 2021 22:21:56 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HRTc7BjlWVqaFo672mNZuwHd+itbJY55d6+cblpowBY1V6U5RKwP2NgRQf138TaqnqVkNZ9JtqN8GSb/9JPs3TlV2/wuAe41c+3ilNFHqeArT6+zRh3eH1TzpwdBrVNfYNilyIN3zUt3hAjJpFR6QrHdL08tUfvN4NAZmQKbKXS5wX/axWenILYlSpBlCewpbZpzvQeKrx3MruOhnlYa/WcanyKEo2eTWL86ls9bonvOkpA4DHtvleqsCJRB1zdY6Az3KsnFCoTdtYCGdp5YI2NiS2Oiwp5qXv6vijZgiAcv2UMsSzxADrKhxgQlBH3OOEPBCMwmbIiUYoANJKnpJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uOY78QPH6YwX0qHjo/C9tjIsWS3wkLb3W2wzAeqjYf4=; b=TsOxDpO9eodLirzJVgp0LT5u2EQYME4VOhacIrW54Im8LJKEoEwER/oVYnwmToZvw+6DHXWyVlIJoWLMQ6rBTkfClRHcpMZRtKrRZG3P3lfV+iKwLuKG0BTHfZ+2CTL3/d7WdZ89G2s/DRhB2OhWnz7UE4BE6FfzTol3yXuG+IxSaWn8VTBajJJMTnWMZlgR3+8+EesJg2/cAS962bUA94xZhh/lm9/e3Ap1/wr6zjqfIrUIOT1JI/fhgWeQ4PMCzK7jvg+6vH+eIg23jErfFToSwV8/1etmPUAOf62bFERJhL70As164RveZbtw7PFPqoXcP1+FvyAG8OexeMO5Cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uOY78QPH6YwX0qHjo/C9tjIsWS3wkLb3W2wzAeqjYf4=; b=eKhpHvkn7PaozYQxaMgjnH5C0+ESlXdZqaWPpJN5Ycd+8Xcrx9Y7v3kjsNj+pZXYLjT+zYayeK5FWdOLoZetS8BzQWYSD7o+G7BDPWF8t4r2liUQiv0wiQ8ahd9pmXos5qNrUBO7CeBvn01TAeUeqyAkTUwIeDbaaQarqTMbjfM= Received: from PH0PR04MB7158.namprd04.prod.outlook.com (2603:10b6:510:8::18) by PH0PR04MB7382.namprd04.prod.outlook.com (2603:10b6:510:1e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Tue, 7 Sep 2021 14:21:56 +0000 Received: from PH0PR04MB7158.namprd04.prod.outlook.com ([fe80::3d04:c2fb:e69f:27e8]) by PH0PR04MB7158.namprd04.prod.outlook.com ([fe80::3d04:c2fb:e69f:27e8%6]) with mapi id 15.20.4478.025; Tue, 7 Sep 2021 14:21:56 +0000 From: Niklas Cassel To: Jens Axboe CC: Bart Van Assche , Damien Le Moal , Paolo Valente , Ming Lei , Niklas Cassel , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH 2/2] Revert "mq-deadline: Fix request accounting" Thread-Topic: [PATCH 2/2] Revert "mq-deadline: Fix request accounting" Thread-Index: AQHXo/O2L+LBuS/YJECb1WaT3ju4YA== Date: Tue, 7 Sep 2021 14:21:56 +0000 Message-ID: <20210907142145.112096-3-Niklas.Cassel@wdc.com> References: <20210907142145.112096-1-Niklas.Cassel@wdc.com> In-Reply-To: <20210907142145.112096-1-Niklas.Cassel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.31.1 authentication-results: kernel.dk; dkim=none (message not signed) header.d=none;kernel.dk; dmarc=none action=none header.from=wdc.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 88aa69fe-3444-42e0-55b5-08d9720ad8c6 x-ms-traffictypediagnostic: PH0PR04MB7382: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:530; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7QZTT/Ij7oW2kGVsU3eHlV0ZI6mSSQYK2pN6cQA072BICTFwOlKsq0mJOATFKRwynhfx/G/VIFRCyNUrF/bwTFGRWMo/gP0vdNm3jSDrR2EKSqpWSDkWhrJwOECLEWNaBowirydjdiaffjtEhxnXIOPlSuxAdaP8ec/8+SXkN+3LNq2ItpTIjfBA/r2EhVZyZ2ogm88bvrOzMgCOC4caXt9XbpldlECw9mSaY19vcSo50mo4NJbjNlXLkixv/ayBd9dZbffAmj7Sea6eVbGkx2OBEK54+mrC49QkAR/kiN18z0EjBkUGkCRHkPCPMgVL9X0/Dw8a+ahbqmXbVzuPhMQh1JCTf7bkeqDMxPkIeqclxXoaS0Ruwy9wZCfFSjNK9odhtv8sMSEp/QmS8OfcVu4uA+I1T/Hycv6rt8ulok7kX/4cor7clqRL+7FDo4DIPEJdiWph8z29nvpxuvNB/XXAy4hdeA5UiYTVRF6mu8IUbMd/WvhcNUjYt3QRZcMcXQxiu/8ZNjIMMmaO/H2I0b3DPPmIEcc0x5qZJ/m4qmaU6lahzQ+HgrWOez9qkUJWyF3M8fL58SiNny57UbZNdbSpSIBJiAyHejEc3cXZwHaaA+90l1WK6dRJWUblHvsJWkiBh1uMCuCQtbk+ySmlfUcDf5mjJs1tTsEBOfDm0gOCUMeaIjrR1E+dhq6Et8+XTfVLPuJ9Ecnwc968xbLD0A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR04MB7158.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(396003)(39860400002)(366004)(136003)(346002)(6916009)(2906002)(478600001)(5660300002)(8936002)(2616005)(36756003)(186003)(1076003)(64756008)(66476007)(26005)(15650500001)(38070700005)(38100700002)(71200400001)(6512007)(122000001)(66446008)(86362001)(66556008)(76116006)(83380400001)(4326008)(6486002)(8676002)(6506007)(91956017)(316002)(54906003)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?7wmGab3acS/FcazQCAHeO0vel5rMHf1/NCNMnXqvw7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UZzGu2r2RY6hj7JyFWqulkZ0JaPHkWv26Yrg6UKmWBHIDm?= =?iso-8859-1?Q?27KAp2+OfcbEenRyOp47WKNs5mL2glVuZaNz2Xt0lDAnAQ8IFeoNqPwhbv?= =?iso-8859-1?Q?r9p5Mc7to5jzf4C3WZvGJRzzw0InefGdW4r9Dd31ER1HHG5rh5/D2vYH5X?= =?iso-8859-1?Q?58Qo9WJ4a+WwqxEQfFIrZXVj//p93ENophMlUQUuQKpA10BFnNRVU9sXIf?= =?iso-8859-1?Q?7wJOHuchrE1Y8t4qov1monX5Hdwa27I7fZpAxI9pg66bTbFY/hr/qt4/aJ?= =?iso-8859-1?Q?P8IydAyenOy3NMmX7S8eKBmUYSzHX7XA2W0ADBcu/Db4d64BxMmI9qJume?= =?iso-8859-1?Q?tLpn5KzmNjTnZ6bHpnirK3sYXFUlBuPVwqZkmJKMNVuoQKCfQxJC8LmquJ?= =?iso-8859-1?Q?5nAr9g2AiWmKBa2vIVOTtI2Xc8Q7LgoGZ9w2dhODwdpRsJHVCSS3JMV+PO?= =?iso-8859-1?Q?wWCLLkAgiJlaj5xAMXnd3yD7ksurPAmA=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR04MB7158.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88aa69fe-3444-42e0-55b5-08d9720ad8c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2021 14:21:56.0407 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 37cK5aB6Ga1Ajwvf+oMkoTTD9RqgU3FFAg2izBHGNygok0pdiTW9ZxWQLpuCKr9XG1YDGDtERmv9Qt7LCXJQeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR04MB7382 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel This reverts commit b6d2b054e8baaee53fd2d4854c63cbf0f2c6262a. blk-mq will no longer call the I/O scheduler .finish_request() callback for requests that were never inserted to the I/O scheduler. Therefore, we can remove the logic inside mq-deadline that was added to workaround the (no longer existing) quirky behavior of blk-mq. Signed-off-by: Niklas Cassel --- block/mq-deadline.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 7f3c3932b723..b2d1e3adcb39 100644 --- a/block/mq-deadline.c +++ b/block/mq-deadline.c @@ -678,7 +678,6 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hct= x, struct request *rq, =20 prio =3D ioprio_class_to_prio[ioprio_class]; dd_count(dd, inserted, prio); - rq->elv.priv[0] =3D (void *)(uintptr_t)1; =20 if (blk_mq_sched_try_insert_merge(q, rq, &free)) { blk_mq_free_requests(&free); @@ -727,10 +726,12 @@ static void dd_insert_requests(struct blk_mq_hw_ctx *= hctx, spin_unlock(&dd->lock); } =20 -/* Callback from inside blk_mq_rq_ctx_init(). */ +/* + * Nothing to do here. This is defined only to ensure that .finish_request + * method is called upon request completion. + */ static void dd_prepare_request(struct request *rq) { - rq->elv.priv[0] =3D NULL; } =20 /* @@ -757,14 +758,7 @@ static void dd_finish_request(struct request *rq) const enum dd_prio prio =3D ioprio_class_to_prio[ioprio_class]; struct dd_per_prio *per_prio =3D &dd->per_prio[prio]; =20 - /* - * The block layer core may call dd_finish_request() without having - * called dd_insert_requests(). Hence only update statistics for - * requests for which dd_insert_requests() has been called. See also - * blk_mq_request_bypass_insert(). - */ - if (rq->elv.priv[0]) - dd_count(dd, completed, prio); + dd_count(dd, completed, prio); =20 if (blk_queue_is_zoned(q)) { unsigned long flags; --=20 2.31.1