Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5259988rwr; Mon, 8 May 2023 21:45:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74ZKHmTRvYf6vvJva0aUEcLEb895RTRbHw/hZIdmcil2gsj7yT7qPEiv2rPGCTYfePanpX X-Received: by 2002:a17:90a:b281:b0:24e:1dcd:4e73 with SMTP id c1-20020a17090ab28100b0024e1dcd4e73mr12849519pjr.0.1683607548232; Mon, 08 May 2023 21:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683607548; cv=none; d=google.com; s=arc-20160816; b=ZUacZqM5vWtt8cPVATB056QS1K6YYfZcetBrs2kzsGVu+R5VxmAeVktASB5diNDRuA 3/+8Rs5ZT3wq+vTqUE280bTe2GaKgx79jqbYz64Lr4g+VYbEk9ToNPB4ssvPyIE6UOKw d2ksqjQ6vnIKm+Tm58xIx8DQ9fQw59fjXqBkm8ZEqguqIMkOaQHgiZCMrtvSDO2evzXg gqAruX62+U/S1+u/uw0c7aA1J6NGnd1LW7Fttfn/3aiE4y/8bQmeKFGidYg8Ce4Ia7FN L6DkPPfvnjWvsjBI/2AovikGhB+KU5MfIPVflzWRATflyUiCgI0uTHg1wW1pdW1TPQiU 4YfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=hju9RP+TJIwPzHSbklx9tx6RuP11kFVSULgO0JpvMYo=; b=i5s0DRJxSdNWEYThy818hgUhB5XpE2FfK2I72RIQ7v4Kui822Q3KynXcrrN8Kf7lJE 1SjeAIvFunq5W9m3XWB4/NDYtyoL7nwzr+GcQoxQs36TndvX7VNBelnXNlj7mRPZOrSy pZJjTpyxtX+UIQWCFqAQk/xD31EnY1GfR1WF8zNPdAhJLzuFYf8FqRvp6c7LPJmddTjv rNGaeSebEZNFc6kNON9bh63n8TTDqrsdMoDZcLH1mKl1sPu292PDT5mxGYE2FGze22KR mYuiVZWkEsYnreR7fe/tO7k+tcw2e170MtgXXgJC3gFnrRY1mGHTAMyUc6HHMir560ok cYIg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q63-20020a17090a1b4500b00233f3034302si14150746pjq.46.2023.05.08.21.45.33; Mon, 08 May 2023 21:45:48 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234719AbjEIEXA (ORCPT + 99 others); Tue, 9 May 2023 00:23:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjEIEW6 (ORCPT ); Tue, 9 May 2023 00:22:58 -0400 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A1244A0; Mon, 8 May 2023 21:22:58 -0700 (PDT) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-52c30fbccd4so4921844a12.0; Mon, 08 May 2023 21:22:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683606177; x=1686198177; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hju9RP+TJIwPzHSbklx9tx6RuP11kFVSULgO0JpvMYo=; b=MHzG6A3YAVgfm/t7ioHZV0BS6k0e5qshXSzy7XuJTgXL7pu/SHRQkogNdbmtvQawUL oJaA46YxNdLEFXCvywMiV357tNAUniLGPZ0n7Pc0/rusqzAk/kZb1o/3CnNlqxX6IwzJ MV/X4wHPlS6mlMrrT1x26b0zU3dLvIYsTQ4/duDGN70aC84UxFCfkcTM8yqiKAj/Fofz 4bcIwdD6VCEoCh4t3z2JhpbmWvy3Q/AToEaJ21S18oPy5d4pHjacMjAjYc6dmHzyRC1Q tNMknqyz/g9+VVYzLpu30p/qDAo1kS0K8q0H8wxu0GZ4Cpp+WylmJkCmn4bEBmx8rWAT FOUQ== X-Gm-Message-State: AC+VfDyAYHm6wyX41X4VRYUdd4hdQhuazMxOSn70St74zEB5Y+2QL92A PfDHbm1Nvq0Xf0gvw3xzL2e6Fsb/2Hg= X-Received: by 2002:a17:902:cec2:b0:1a8:1f41:59ba with SMTP id d2-20020a170902cec200b001a81f4159bamr15207641plg.38.1683606177395; Mon, 08 May 2023 21:22:57 -0700 (PDT) Received: from [172.20.11.151] ([173.214.130.133]) by smtp.gmail.com with ESMTPSA id s23-20020a170902989700b001a96269e12csm350939plp.51.2023.05.08.21.22.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 May 2023 21:22:57 -0700 (PDT) Message-ID: <61f8f885-3f75-4e05-37dc-b54489adaeb7@acm.org> Date: Mon, 8 May 2023 21:22:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v1] block: make the fair sharing of tag configurable Content-Language: en-US To: Ed Tsai , axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, martin.petersen@oracle.com, stanley.chu@mediatek.com, peter.wang@mediatek.com, chun-hung.wu@mediatek.com, alice.chao@mediatek.com, powen.kao@mediatek.com, naomi.chu@mediatek.com, wsd_upstream@mediatek.com References: <20230509012758.27094-1-ed.tsai@mediatek.com> From: Bart Van Assche In-Reply-To: <20230509012758.27094-1-ed.tsai@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 5/8/23 18:27, Ed Tsai wrote: > diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c > index d6af9d431dc6..b8b36823f5f5 100644 > --- a/block/blk-mq-tag.c > +++ b/block/blk-mq-tag.c > @@ -97,6 +97,7 @@ static int __blk_mq_get_tag(struct blk_mq_alloc_data *data, > struct sbitmap_queue *bt) > { > if (!data->q->elevator && !(data->flags & BLK_MQ_REQ_RESERVED) && > + blk_queue_fair_tag_sharing(data->q) && > !hctx_may_queue(data->hctx, bt)) > return BLK_MQ_NO_TAG; Has it been considered to move the blk_queue_fair_tag_sharing() call into hctx_may_queue()? That should make this patch shorter. > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 17d7bb875fee..e96a50265285 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -5149,6 +5149,9 @@ static int ufshcd_slave_configure(struct scsi_device *sdev) > blk_queue_update_dma_pad(q, PRDT_DATA_BYTE_COUNT_PAD - 1); > if (hba->quirks & UFSHCD_QUIRK_4KB_DMA_ALIGNMENT) > blk_queue_update_dma_alignment(q, 4096 - 1); > + > + blk_queue_flag_clear(QUEUE_FLAG_FAIR_TAG_SHARING, q); > + > /* > * Block runtime-pm until all consumers are added. > * Refer ufshcd_setup_links(). Please split this patch into one patch for the block layer core and another patch for the UFS driver. Thanks, Bart.