Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp465497imn; Mon, 25 Jul 2022 23:57:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ufRDO+lrpSs55z+jxRMX5Ef+Io5s0LIxh0wnTbj/iu+z8noagogliji/omKLA6iI1MUva2 X-Received: by 2002:a17:906:11d:b0:712:abf:3210 with SMTP id 29-20020a170906011d00b007120abf3210mr12538398eje.292.1658818634738; Mon, 25 Jul 2022 23:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658818634; cv=none; d=google.com; s=arc-20160816; b=NDdMSNYAW5D5iVbwhOINXqX7kCRoDSGeesDDmCE8Xc0Usc66o0MRyvkxp1GacDOl2M b6hxmsBeJ3iS0aklU1rmyaVI5hVagzrFzSyeCAvg2I81+gjizD1DIt0fUNLRFWqRGsiH YBtMKcUtdtGOjPo9MigGKHSPKSRbL+n8q5aurO6H2mXUzp88NkjWCkVBsOIt0d7sqm8D 4nWnBLRL3g0Eb4CRvdlVDXLM7A/yg4hJ5/Lw3UrKz1RLRu8t9Y1XslKHz/SODlEmJfrS TCEX5xr4xByWV+kBA3rR1ErRT09QKTCQaoR1fGMDkFCQ4cKYfCOM2QJmPjFq+2Tfx4GU /T0w== 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:dkim-signature; bh=o0AGuCbDQgQfq9ai86IVzKSjcgci0SSS5ogiey3b7dI=; b=rKTJliDjnRt9tvxleZlL48Ul2138Pdt0F/Z2U0N9Gb2GsQEeb/uH/g2TOKo2UzZoCY RuYqhNVdaSYD17pu6K+Clt/EuMiWPoZtuGhK88NhJISzT75TkWnnCG0Cl/aO+3cp3c2V 0NJ3WB4O3fhAqjXjvhuzL8ucEfExjC5fBwMg5uXw3SBhE0n9ufLyzzSUZU6Q4shJhBZ5 TNI4DqP0+CfqDcDJl2hGNwTItCvRh7Ad85yC7oPx9UzNjs8x0WCSA/PfXPMDuFNQ8mG2 xf4fU57w8dGRaGRdw7eYJhUMJiBNh7X+xsGRxgxHUrWfYTIHH6TeA2IGjwfGASYLrWGa cRIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=revI4MUw; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sy13-20020a1709076f0d00b00718c2c40965si14987746ejc.436.2022.07.25.23.56.49; Mon, 25 Jul 2022 23:57:14 -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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=revI4MUw; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238045AbiGZGs4 (ORCPT + 99 others); Tue, 26 Jul 2022 02:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237690AbiGZGsz (ORCPT ); Tue, 26 Jul 2022 02:48:55 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F07C6220FD; Mon, 25 Jul 2022 23:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1658818133; x=1690354133; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=o0AGuCbDQgQfq9ai86IVzKSjcgci0SSS5ogiey3b7dI=; b=revI4MUwjTvU27oldLQ/mcFULWowGtkAXHma+SW+te5M12hbfA7KrUN6 ouHJd+1lIapARchiE5NAz7IZQEYaiATxQtGAOdU+sKfuaOhAZDXVe68j9 VFAWVbAQQkwGq+Exp+QXwycAnM0irm9Douq1wbo0CS4om18puUtwgLQVT A=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 25 Jul 2022 23:48:53 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2022 23:48:53 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 25 Jul 2022 23:48:52 -0700 Received: from [10.253.34.146] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 25 Jul 2022 23:48:48 -0700 Message-ID: Date: Tue, 26 Jul 2022 14:48:45 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 1/2] scsi: ufs: Add Multi-Circular Queue support Content-Language: en-US To: Bart Van Assche , Avri Altman , "stanley.chu@mediatek.com" , "adrian.hunter@intel.com" , "alim.akhtar@samsung.com" , "beanhuo@micron.com" , "quic_asutoshd@quicinc.com" , "quic_nguyenb@quicinc.com" , "quic_ziqichen@quicinc.com" , "linux-scsi@vger.kernel.org" , "kernel-team@android.com" CC: "James E.J. Bottomley" , "Martin K. Petersen" , Daejun Park , Jinyoung Choi , Kiwoong Kim , open list References: <1658214120-22772-1-git-send-email-quic_cang@quicinc.com> <1658214120-22772-2-git-send-email-quic_cang@quicinc.com> <1de1372e-1c69-611b-0999-c162da8013ac@acm.org> From: Can Guo In-Reply-To: <1de1372e-1c69-611b-0999-c162da8013ac@acm.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 Hi Bart, On 7/23/2022 1:58 AM, Bart Van Assche wrote: > On 7/22/22 00:31, Avri Altman wrote: >>> +#define UFSHCD_MCQ_IO_QUEUE_OFFSET 1 >> Maybe add a comment above: "queue 0 is reserved for query commands" >> or something >> That is if the query commands don't use theĀ  legacy doorbell > > Is it essential to reserve a queue for device management commands? > Wouldn't it be better to have one additional queue for submitting I/O > commands rather than reserving a queue for device management commands? Since this is just RFC change, we are trying to make the whole thing work with minimal efforts. So we found that having a reserved queue (with only one active command) for device management requires much less changes in ufshcd.c, because current device management commands anyways come one by one (we have a mutex lock dev_cmd.lock held in exec_dev_command()) and it is easy to handle/assign the task tag for device management command by just reading sq_tp_slot. If you think this needs to be improved, can you please elaborate your idea? Thanks. Regards, Can Guo. > > Thanks, > > Bart. >