Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp4100550pxp; Wed, 23 Mar 2022 11:14:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybi1/j3q8ZbPVke8Fat/FnfMiifHzFF1O2UJnI/R7DoEpRQhhOCcZg+Y2u7pzPyafMPdRN X-Received: by 2002:a17:902:a706:b0:153:ce8e:66fe with SMTP id w6-20020a170902a70600b00153ce8e66femr1346780plq.157.1648059251081; Wed, 23 Mar 2022 11:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648059251; cv=none; d=google.com; s=arc-20160816; b=f1qd1lmYUG3dIXoj+ctBf+JutCYeGvBnt0rYgDhDvNGD+PwDB2Y3fIg1a8mYfilR9k ufPd/M7uDANOPMWM4AA2MNK8Hzbo2+nNr4DdRa8qWLVkR0NSHxTIBdj5z2+gndAAWRt6 1rEDGRFoMKGG0zRJDwFu1WaSXyd0ZZxDogD+89z04fWrT1JjkmwgsvaHTbP9OEMFA4uO NbYdmsfhSEQMjIrpFQHHI5tMJphyZsSdbqm5VDJRH8YX/26A8c6xCq2GmjZ5zxvBS9v7 IeenkXX5q128PJZOCw19U8Sj6uuOq586oIPxgJNF0cGujNz8y9++PAeqCNXrZoNTP+Ny m8Gw== 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:subject:user-agent:mime-version:date:message-id; bh=gstnDcdpEdjQxkygZTOvYzOvvW7n/2x9IUB56StLkbQ=; b=PVWv7wj8UMcsX+jYGF1jePeQrSurYkhNQ1ojNq4S6xfkMEh53MvpMyIN3Una+wpo8Y FE0w51sc89WRSlP4JNgARF06KPc6a1LaAx/DMPC12j9c1YkWTpuuXxmRsU4JAnllc5L6 ppzIUyBXqDaH1yXvqfIC5mdawExf6SrS059x1VZq7O/AzizhYLivcDcSKenELfbnRZUT hhBhklsFnkSdpMGWLzDjTYiemi1+KDL64N0nMzMdZZmghgtI2JIjIyQgX8vvYFWsTBVJ rQpxcmqEdWFvJqP3PyFFvcwoG/B98/x2jZmB0+hC5I4rzkzaR2o71KyJlf5PWpSq57wH R6jw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be4-20020a056a001f0400b004fadacb3e0asi2194267pfb.152.2022.03.23.11.13.56; Wed, 23 Mar 2022 11:14:11 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243017AbiCWJDL (ORCPT + 99 others); Wed, 23 Mar 2022 05:03:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234009AbiCWJDK (ORCPT ); Wed, 23 Mar 2022 05:03:10 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 326116EB0D; Wed, 23 Mar 2022 02:01:40 -0700 (PDT) Received: from fraeml743-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KNj3b1ngBz67PtB; Wed, 23 Mar 2022 16:59:55 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml743-chm.china.huawei.com (10.206.15.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 23 Mar 2022 10:01:37 +0100 Received: from [10.47.85.68] (10.47.85.68) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Mar 2022 09:01:36 +0000 Message-ID: <378065de-3cb8-b44f-66e9-747960bcd990@huawei.com> Date: Wed, 23 Mar 2022 09:01:33 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 01/11] blk-mq: Add blk_mq_init_queue_ops() To: Bart Van Assche , , , , , , , CC: , , , , , , References: <1647945585-197349-1-git-send-email-john.garry@huawei.com> <1647945585-197349-2-git-send-email-john.garry@huawei.com> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.85.68] X-ClientProxiedBy: lhreml730-chm.china.huawei.com (10.201.108.81) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,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 23/03/2022 02:57, Bart Van Assche wrote: > On 3/22/22 03:39, John Garry wrote: >> Add an API to allocate a request queue which accepts a custom set of >> blk_mq_ops for that request queue. >> >> The reason which we may want custom ops is for queuing requests which we >> don't want to go through the normal queuing path. > Hi Bart, > Custom ops shouldn't be required for this. See e.g. how tmf_queue > is used in the UFS driver for an example of a queue implementation > with custom operations and that does not require changes of the block > layer core. The UFS code uses a private tagset (in ufs_hba.tmf_tag_set) for only management of TMF tags/memories. This tagset does not really have any custom operations. All it has is a stub of .queue_rq CB in ufshcd_queue_tmf() and that is because this CB is compulsory. As for the idea of having multiple tagsets per shost with real custom operations, this idea was mentioned before, but I think managing multiple tagsets could be trouble. For a start, it would mean that we need a distinct allocation of reserved and regular tags, and sometimes we don't want this - as Hannes mentioned earlier, many HBAs have low queue depth and cannot afford to permanently carve out a bunch of reserved tags. Thanks, John