[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0a4ef07-afc8-51c7-c395-92ed798b914b@quicinc.com>
Date: Tue, 26 Jul 2022 14:21:42 +0800
From: Can Guo <quic_cang@...cinc.com>
To: Avri Altman <Avri.Altman@....com>,
"bvanassche@....org" <bvanassche@....org>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"quic_asutoshd@...cinc.com" <quic_asutoshd@...cinc.com>,
"quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
"quic_ziqichen@...cinc.com" <quic_ziqichen@...cinc.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"kernel-team@...roid.com" <kernel-team@...roid.com>
CC: "James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Daejun Park <daejun7.park@...sung.com>,
Jinyoung Choi <j-young.choi@...sung.com>,
Kiwoong Kim <kwmad.kim@...sung.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] scsi: ufs: Add Multi-Circular Queue support
Hi Avri,
On 7/24/2022 12:32 PM, Avri Altman wrote:
>> +
>> +/**
>> + * @ucdl_base_addr: UFS Command Descriptor base address
>> + * @sqe_base_addr: submission queue entry base address
>> + * @sqe_shadow_addr: submission queue entry shadow address
> When you are editing your commit log, could you please also say something about the shadow queues concept?
Sure, we will add comments in next version.
> And why it is a good idea to maintain 2 sets of addresses, which basically points to the same place?
When block layer chooses one task tag for one command, that tag will be
used to link these pre-allocated data structs -
ucdl[tag]<->lrpb[tag]<->utrd[tag], and the tag chosen by block layer is
random (it does not increase from 0 to n and goes
back to 0 in a circular way). But, in MCQ mode, when we submit the
command to UFSHCI, we need to make sure the SQTP
get increased one slot by one slot (we cannot skip slots). Hence by
keeping shadow utrds (or shadow SQEs), the data struct
linkage ucdl[tag]<->lrpb[tag]<->shadow_sqe[tag] remains same, and we
copy the shadow sqe to the sqe[sq_tp_slot] only
when we finally decide the very sq_tp_slot used to submit this command
in SQTP.
The benefit is that we can 100% leverage the existing initialization
logic of lrbp in ufshcd_queuecommand path without changing a line.
Otherwise, considerable changes would be required to implement the idea
of dynamical SQE assignment (to lrbp).
Thanks,
Can Guo.
>
> Thanks,
> Avri
Powered by blists - more mailing lists