[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f6a79164-944c-a355-40f3-0bddbcb37357@acm.org>
Date: Thu, 1 Jun 2023 13:54:38 -0700
From: Bart Van Assche <bvanassche@....org>
To: Peter Wang (王信友)
<peter.wang@...iatek.com>,
Powen Kao (高伯文) <Powen.Kao@...iatek.com>,
"chu.stanley@...il.com" <chu.stanley@...il.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
CC Chou (周志杰) <cc.chou@...iatek.com>,
Eddie Huang (黃智傑)
<eddie.huang@...iatek.com>,
Alice Chao (趙珮均)
<Alice.Chao@...iatek.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
wsd_upstream <wsd_upstream@...iatek.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"avri.altman@....com" <avri.altman@....com>,
Chun-Hung Wu (巫駿宏)
<Chun-hung.Wu@...iatek.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
Naomi Chu (朱詠田) <Naomi.Chu@...iatek.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Stanley Chu (朱原陞)
<stanley.chu@...iatek.com>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>
Subject: Re: [PATCH v2 1/3] scsi: ufs: core: Introduce mcq ops to config cqid
On 6/1/23 07:41, Peter Wang (王信友) wrote:
> On Thu, 2023-06-01 at 07:23 -0700, Bart Van Assche wrote:
>> Thanks, I had overlooked this. Do you agree that the above shows that the
>> flag I proposed in my previous email (UFSHCD_CAP_SINGLE_CQ) is sufficient
>> to support the MediaTek use case? I want to keep the SQ-CQ association code
>> in the UFS driver core because the next step will probably to switch from
>> one CQ per SQ to one CQ per CPU core for UFS controllers that support
>> multiple completion interrupts.
>
> If the UFS device speed is geting higher and higher, one CQ may not sufficient.
>
> So, UFSHCD_CAP_SINGLE_CQ is not flexible for us beacuse we may want to map to two CQs.
Hi Peter,
Let's take a step back. The MediaTek UFSHCI 4.0 host controller only
supports a single completion interrupt. A significant disadvantage of
the single completion interrupt approach is that all completion
interrupts are processed by the same CPU core. This is known to cause
problems on Android. If sufficient time is spent in an interrupt
handler, threads that run on the same CPU core as the interrupt handler
may get scheduled too late. This can result in e.g. audio glitches
noticeable by humans. Hardware designers told me that the area occupied
by a single interrupt line is small. So I think it is fair to say that
the (nonstandard!) approach of only supporting a single completion
interrupt in an UFSHCI 4.0 controller is not a good choice.
The UFS driver already supports multiple hardware queue types
(HCTX_TYPE_DEFAULT, READ and POLL). An interesting optimization would be
to combine the completion queues for at least the DEFAULT and READ queue
types. Introducing a vop to configure the completion queue ID would make
it almost impossible to implement this optimization in a generic way.
Asking to add a vop that improves performance by only a few percent for
a *nonstandard* controller and at the same time that makes it very hard
to optimize the driver for standards compliant controllers is something
that I consider unreasonable.
Bart.
Powered by blists - more mailing lists