Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3855885pxb; Tue, 7 Sep 2021 09:00:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP9K+scIQsOh7Eq1QrnmpzvrcLKJsUPwrdPIXlTRmqyezBtVZ4kaQFggPedAcYPZPr6rWm X-Received: by 2002:a05:6402:2292:: with SMTP id cw18mr157301edb.109.1631030428292; Tue, 07 Sep 2021 09:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631030428; cv=none; d=google.com; s=arc-20160816; b=lCMRLruxknZmPpL1nfnRRbkwRjyVAcrxicI7OAEpoSQmAVEUDDexPZ0/pG5JC4gSvh ZGZsFwerUWMbstGqCv3dIHRCCOysI4FlRFkxrwwDKdJ46mtXpbB2jV+adW49RSqIJT+O LL/qUmQ9UWhRwt52nP8BIB3TJFwTLeke2xO3Z5j5OjydZhlRppwJ/VGBTdnmYpsTOAzQ Ewxo1nAvNkcK3+AjoFfad1/IhvJUYaxYGb0G/9M6mU3pXdgsWxOFFe5qW5zCbMAN2K1F rHVaM7lprjlr0o/vzitpju4pH4CDSENhkxRVvraXkIcVTDDmzXV3/p1V8mWBCXYf+3+V ocIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=doC0bChKVgon7i4ZRt3+TPnbeJ72I5HQLlZ8D5aOmik=; b=Rn98/5SoRCikJBRbztVZHa6YUob6d0Lrjb+GfSi+jm9wLMn1dkBfoCj3COUg1WqNYY mRMXBxT1xVMR0AfwzWyU3lkg1GLhBi7Ne8sIEFQcjtzMKQJpSl8Z1exDGno1Gck+dYnt SkFFeQFWi7gWZ0RPwobh+lOu77E2pbZC5dFagY2c2EM1IaMMs7ltLrfVCr/vBpsXCXH7 4GFFAIp3TOeGzwxNI/F74OTGLFmWe/JFIvbIAtEH73BYbB5rYqhreRmhZXKlCBR/DymI hx1kZeIXSnBN2kRgx6bTrE3czJBq0PB3NmrrpnVX/xG+bfWOicqeNILc4wDCSt3RFVV9 yvAQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 6si13769587eje.339.2021.09.07.09.00.03; Tue, 07 Sep 2021 09:00:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237912AbhIGOzW (ORCPT + 99 others); Tue, 7 Sep 2021 10:55:22 -0400 Received: from mail-pg1-f177.google.com ([209.85.215.177]:37870 "EHLO mail-pg1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbhIGOzT (ORCPT ); Tue, 7 Sep 2021 10:55:19 -0400 Received: by mail-pg1-f177.google.com with SMTP id 17so10252261pgp.4; Tue, 07 Sep 2021 07:54:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=doC0bChKVgon7i4ZRt3+TPnbeJ72I5HQLlZ8D5aOmik=; b=DNInj884dEaTUsS9/+FFVNGe3eSoiTbdO3PqklLtsBkjpaKH2wkDMAySbyILA16UZK /KV/9CcbYohd1n5vc2tb9Tdsk/l6MLHo0audKAxUqvbj8Q50kaxG55Wr5gD9iVLras5h LMVBMX4yvZlFIp4H9B3JfZjMdFwQmx0O3xcU47AO0NL6kB+/4mmS8Cw8kW4iDYTquFmx IZ6nyV6sln15o5QgohENfnuOrJKK5hDLS3arK1saERfoqWhSjVuk1fuwoMfI2QwApMef ezX3GHINvBgLTpgvVmSiyMQsu2Gvn6/avcJhKf+JStTK3wMee4m672dEbTrOhcxuIoAA 7Q6Q== X-Gm-Message-State: AOAM532Buf55I9u25P5PL9ugGLsL9/wAZpuOtfCrxrkbIWS+2SO7GdD/ 3NH5+AFDLREl7yVQ/pCO/KV0EuFYaUM= X-Received: by 2002:a63:f913:: with SMTP id h19mr17589566pgi.351.1631026452118; Tue, 07 Sep 2021 07:54:12 -0700 (PDT) Received: from [192.168.50.110] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id t3sm13765481pgo.51.2021.09.07.07.54.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 07:54:11 -0700 (PDT) Subject: Re: [PATCH 2/2] Revert "mq-deadline: Fix request accounting" To: Niklas Cassel , Jens Axboe Cc: Damien Le Moal , Paolo Valente , Ming Lei , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20210907142145.112096-1-Niklas.Cassel@wdc.com> <20210907142145.112096-3-Niklas.Cassel@wdc.com> From: Bart Van Assche Message-ID: Date: Tue, 7 Sep 2021 07:54:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210907142145.112096-3-Niklas.Cassel@wdc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/21 7:21 AM, Niklas Cassel wrote: > 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 *hctx, struct request *rq, > > prio = ioprio_class_to_prio[ioprio_class]; > dd_count(dd, inserted, prio); > - rq->elv.priv[0] = (void *)(uintptr_t)1; > > 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); > } > > -/* 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] = NULL; > } Please take a look at https://lore.kernel.org/linux-block/18594aff-4a94-8a48-334c-f21ae32120c6@acm.org/ If dd_prepare_request() is removed I will have to reintroduce it. Thanks, Bart.