Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1973755rwb; Fri, 11 Nov 2022 03:17:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7SdgrGpBxU83TPpVq7L2lUzBBoX0TTnDdXG8VHrHp+50dWS8VglyqnvFuMlauwKV4fyVMw X-Received: by 2002:a50:d485:0:b0:461:af68:9bcd with SMTP id s5-20020a50d485000000b00461af689bcdmr1116300edi.67.1668165429716; Fri, 11 Nov 2022 03:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668165429; cv=none; d=google.com; s=arc-20160816; b=HqENz0hg/S165WmLCuBBaoWSJAgdZ3aN7GgJbpy+bulfRiFuTtXdY5UxEXoHHfWc6O 5HrG+sjmjH6oMwJa3ocfETqWMh+E8wt81WMJ4kd1H81dsFj/LLHmmL3pU0pLWkrcG4o9 gQEJtBSjFwZFhRadr0XC9K4glzqdTuDrvhlC7UL3veO126ztG9Vs7PHQzZutzUKhBBbs oJ5Gn1g0/cRwzD/fKI5NYoBqkoA761G3JN9zOduwPsMFIqJiEOc7XHqyDWyehDdI9336 kl1XJgsn7XSuITYSIcdL20UIDyY2EX681u1mkOcTuv7Dmfm97ZDmMilDixeSaliX3KUX po5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=8EoWEktzF4xunmTW3NPGj5C3ZY4hEtE5YC4CZzU3s8w=; b=y8WcgooLaGh+m9qCiMI5CekBLU9b8E0X9eeUPMTqa+/0X4bC3Uq8K/oJQ2RtZ6crC+ 5zhmPwGOxVMayKzYHKNJt/BIOJrRUw5bMBE075t54ofwOCJhYTIN4nDU7ObW8z0UCDO5 a71/HLqu0PdMSQAoGyFtrEuZxn5r2lehVs+4OeoIQIJarD8KNN1HGLzjaQvBqx7TQiP0 02SCTsBgM2eZaUMkhCSq/AIwdEto5+qsoAcg834M1Bq2Z5JB7Hoabf962fVb/6dJzQq3 YA48u17cPYpm6RBJPkxmuk24vGJ6gGVxTdI/9Cq/CLV0NLiit01liQixYG8YVorwnoTf Mxxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=acyxfZqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a056402274500b00461d6a4afd1si2420144edd.8.2022.11.11.03.16.44; Fri, 11 Nov 2022 03:17:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=acyxfZqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233896AbiKKKcL (ORCPT + 93 others); Fri, 11 Nov 2022 05:32:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233908AbiKKKbN (ORCPT ); Fri, 11 Nov 2022 05:31:13 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33DCBFCD for ; Fri, 11 Nov 2022 02:31:00 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id q1so4071687pgl.11 for ; Fri, 11 Nov 2022 02:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8EoWEktzF4xunmTW3NPGj5C3ZY4hEtE5YC4CZzU3s8w=; b=acyxfZqCeg1dzpt9TFsjnhQn9D441fcog0e95pfckukoQsxwDvCRQhFPgJR8Ehj06A iWatB6dA0pInT1CkyiQOUD0zDDsWAN2DpZIfBoidcBu9vwJ4hHQ/cjCGAL491uyM1d5M CxGvCxanZyHQXgfwaH56kiadHxDZInMg512oyn/U9JyNWJf8eVsn1yuS/eJcy20WcHbM c5p3wqwWD7l00XibEwWAb2jkIBTjAEdoin7Ty3U1vGFZJnrocWcOIUXSVFiUqpPSmhKs Ghb0V5BZ3jXS330npx/BMf9ZkicttdE+ysJdV8Q+Uw1Roid4AyagEcXgZQqYjYVL5WSy jMtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8EoWEktzF4xunmTW3NPGj5C3ZY4hEtE5YC4CZzU3s8w=; b=dEw7BVi8fjZpl8A76yxIVtkPQoCRhyJXZDnQ2dBpLjjwYDyF8v34CdK2mJup8c+nY+ DDoh2zA/vBeKNopqRnDLY1uRLvwJE94Y2jaENCvmiccD163oauISILsPNoZPDhRGGUOz 2H6HlszLfOyEJJCGoxMe6LZnvvkNqyzUcXKymgPprXMqGMBhNdsT6FRH7QrWHdUhVh7m Fn7vmHBk+S5S9q0Rmu9SeQwzmVrHXsjPrb+BPbGdZwTgLkEgbl40dH0OdENOybIouLbw SZEtqm4QtYZ1J31kCLCLAX9xIOyXxt64DPJan1ygvuBh7+pCP/MzXjbqvvy3RvaGKGeI V04Q== X-Gm-Message-State: ANoB5pkB4HznimLrPT+3EWo4Y3RinlaztekxY2YcRZEgMvFL2DKuEuwv oPlTqfNAK+x5wVsXZN7gm+sMN9BD0AZLderRxk47LA== X-Received: by 2002:aa7:924c:0:b0:566:9f68:c0ad with SMTP id 12-20020aa7924c000000b005669f68c0admr1951719pfp.57.1668162659697; Fri, 11 Nov 2022 02:30:59 -0800 (PST) MIME-Version: 1.0 References: <22aa78389c9b4613841716c5b7bd89aa@hyperstone.com> In-Reply-To: <22aa78389c9b4613841716c5b7bd89aa@hyperstone.com> From: Ulf Hansson Date: Fri, 11 Nov 2022 11:30:23 +0100 Message-ID: Subject: Re: [PATCH 1/3] block: Requeue req as head if driver touched it To: =?UTF-8?Q?Christian_L=C3=B6hle?= Cc: "axboe@kernel.dk" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , Avri Altman , "adrian.hunter@intel.com" , "vincent.whitchurch@axis.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Oct 2022 at 09:30, Christian L=C3=B6hle = wrote: > > In case the driver set RQF_DONTPREP flag, requeue the request as head as > it is likely that the backing storage already had a request to an > adjacent region, so getting the requeued request out as soon as possible > may give us some performance benefit. This is a bit handwavy to me. Would you mind extending this with a small concrete example, to better understand the benefit? > > Signed-off-by: Christian Loehle Other than the above nitpick, I can't think of any obvious unwanted side-effects this could have. So, feel free to add: Reviewed-by: Ulf Hansson Kind regards Uffe > --- > block/blk-mq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 33292c01875d..d863c826fb23 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1429,7 +1429,7 @@ static void blk_mq_requeue_work(struct work_struct = *work) > * merge. > */ > if (rq->rq_flags & RQF_DONTPREP) > - blk_mq_request_bypass_insert(rq, false, false); > + blk_mq_request_bypass_insert(rq, true, false); > else > blk_mq_sched_insert_request(rq, true, false, fals= e); > } > -- > 2.37.3 > Hyperstone GmbH | Reichenaustr. 39a | 78467 Konstanz > Managing Director: Dr. Jan Peter Berns. > Commercial register of local courts: Freiburg HRB381782 >