lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd2282911c3479fb247280a1c9a2b85fa45be370.camel@mediatek.com>
Date: Thu, 31 Jul 2025 09:22:46 +0000
From: Peter Wang (王信友) <peter.wang@...iatek.com>
To: "beanhuo@...ron.com" <beanhuo@...ron.com>, "huobean@...il.com"
	<huobean@...il.com>, "avri.altman@....com" <avri.altman@....com>,
	"quic_nitirawa@...cinc.com" <quic_nitirawa@...cinc.com>, "bvanassche@....org"
	<bvanassche@....org>, "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
	"andre.draszik@...aro.org" <andre.draszik@...aro.org>,
	"martin.petersen@...cle.com" <martin.petersen@...cle.com>, "mani@...nel.org"
	<mani@...nel.org>, "James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
	"quic_pkambar@...cinc.com" <quic_pkambar@...cinc.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V1] ufs: core: Fix interrupt handling for MCQ Mode in
 ufshcd_intr

On Wed, 2025-07-30 at 09:04 -0700, Bart Van Assche wrote:
> 
> Hi Peter,
> 
> Thanks for having taken a look but I think that you misunderstood my
> patch. My patch does not modify the behavior of the UFS driver on
> systems using the legacy single doorbell mode. It only modifies the
> behavior on systems supporting MCQ. And on systems that support MCQ,
> it
> restores the behavior from before when commit 3c7ac40d7322 ("scsi:
> ufs:
> core: Delegate the interrupt service routine to a threaded IRQ
> handler")
> got merged.
> 
> On MCQ systems, if the completion interrupt is processed by the CPU
> core
> that submitted the I/O, then I/O workloads are self-regulating. The
> more
> time that is spent in the completion interrupt handler, the more the
> submitter will be slowed down. This is not the case in legacy single
> doorbell mode since when using that mode all completion interrupts
> are
> processed by a single CPU core.
> 
> Bart.


Hi Bart,

I am fully agree that your patch is 100% correct.

But what I want to express is that this is a patch
that makes me feel confused about the code.
Originally, ufshcd_intr moved some heavy (legacy) work
to ufshcd_threaded_intr because those work could take
a long time to execute and affect other module IRQs.
This means, in terms of execution time, ufshcd_threaded_intr
could be longer than ufshcd_intr. But if ufshcd_intr calls 
ufshcd_threaded_intr, then the execution time of 
ufshcd_intr becomes equal to ufshcd_threaded_intr, 
and that’s the part confuses me.

Of course, if you look deeper into ufshcd_threaded_intr,
you'll see that in MCQ mode, it doesn’t actually run for 
very long time. But compared to this patch, the readability
would be a bit worse. So I prefer this patch.

Thanks
Peter



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ