linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "André Draszik" <andre.draszik@linaro.org>
To: Neil Armstrong <neil.armstrong@linaro.org>,
	Alim Akhtar	 <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	Bart Van Assche	 <bvanassche@acm.org>,
	"James E.J. Bottomley"	 <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen"	 <martin.petersen@oracle.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	 linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Peter Griffin <peter.griffin@linaro.org>,
	Will McVicker <willmcvicker@google.com>,
	kernel-team@android.com, Tudor Ambarus <tudor.ambarus@linaro.org>
Subject: Re: [PATCH RFT v3 3/3] ufs: core: delegate the interrupt service routine to a threaded irq handler
Date: Mon, 21 Jul 2025 13:10:43 +0100	[thread overview]
Message-ID: <4935395591bc8baef39d2acc491c6c40889090d9.camel@linaro.org> (raw)
In-Reply-To: <1e06161bf49a3a88c4ea2e7a406815be56114c4f.camel@linaro.org>

On Mon, 2025-07-21 at 13:04 +0100, André Draszik wrote:
> Hi,
> 
> On Mon, 2025-04-07 at 12:17 +0200, Neil Armstrong wrote:
> > On systems with a large number request slots and unavailable MCQ ESI,
> > the current design of the interrupt handler can delay handling of
> > other subsystems interrupts causing display artifacts, GPU stalls
> > or system firmware requests timeouts.
> > 
> > Since the interrupt routine can take quite some time, it's
> > preferable to move it to a threaded handler and leave the
> > hard interrupt handler wake up the threaded interrupt routine,
> > the interrupt line would be masked until the processing is
> > finished in the thread thanks to the IRQS_ONESHOT flag.
> > 
> > When MCQ & ESI interrupts are enabled the I/O completions are now
> > directly handled in the "hard" interrupt routine to keep IOPs high
> > since queues handling is done in separate per-queue interrupt routines.
> 
> This patch adversely affects Pixel 6 UFS performance. It has a
> UFSHCI v3.x controller I believe (and therefore probably all
> devices with < v4) - if my limited understanding is correct,
> MCQ & ESI are a feature of v4 controllers only.
> 
> On Pixel 6, fio reports following performance on linux-next with
> this patch:
> 
> read [1] / write [2]:
>    READ: bw=17.1MiB/s (17.9MB/s), 17.1MiB/s-17.1MiB/s (17.9MB/s-17.9MB/s), io=684MiB (718MB), run=40001-40001msec
>   WRITE: bw=20.6MiB/s (21.5MB/s), 20.6MiB/s-20.6MiB/s (21.5MB/s-21.5MB/s), io=822MiB (862MB), run=40003-40003msec
> 
> With this patch reverted, performance changes back to:
> 
> read [1] / write [2]:
> 
>    READ: bw=19.9MiB/s (20.8MB/s), 19.9MiB/s-19.9MiB/s (20.8MB/s-20.8MB/s), io=795MiB (833MB), run=40001-40001msec
>   WRITE: bw=28.0MiB/s (29.4MB/s), 28.0MiB/s-28.0MiB/s (29.4MB/s-29.4MB/s), io=1122MiB (1176MB), run=40003-40003msec
> 
> all over multiple runs.
> 
> which is a ~26% reduction for write and ~14% reduction for read.
> 
> PCBenchmark even reports performance drops of ~41%.

Additional fio results (numjobs=8 instead of 1):

current linux-next:

fio --name=randread --rw=randread --ioengine=libaio --direct=1 --bs=4k --numjobs=8 --size=1g --runtime=30 --time_based --end_fsync=1 --
group_reporting --filename=/foo
   READ: bw=52.1MiB/s (54.6MB/s), 52.1MiB/s-52.1MiB/s (54.6MB/s-54.6MB/s), io=1562MiB (1638MB), run=30001-30001msec
  WRITE: bw=74.7MiB/s (78.3MB/s), 74.7MiB/s-74.7MiB/s (78.3MB/s-78.3MB/s), io=2242MiB (2351MB), run=30004-30004msec


with patch reverted:

fio --name=randread --rw=randread --ioengine=libaio --direct=1 --bs=4k --numjobs=8 --size=1g --runtime=30 --time_based --end_fsync=1 --
group_reporting --filename=/foo
   READ: bw=83.5MiB/s (87.6MB/s), 83.5MiB/s-83.5MiB/s (87.6MB/s-87.6MB/s), io=2506MiB (2628MB), run=30001-30001msec
  WRITE: bw=83.3MiB/s (87.4MB/s), 83.3MiB/s-83.3MiB/s (87.4MB/s-87.4MB/s), io=2501MiB (2622MB), run=30003-30003msec



which is an even higher 37% reduction for read.

A.

  reply	other threads:[~2025-07-21 12:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 10:17 [PATCH RFT v3 0/3] ufs: core: cleanup and threaded irq handler Neil Armstrong
2025-04-07 10:17 ` [PATCH RFT v3 1/3] ufs: core: drop last_intr_status/ts stats Neil Armstrong
2025-04-07 10:17 ` [PATCH RFT v3 2/3] ufs: core: track when MCQ ESI is enabled Neil Armstrong
2025-04-07 19:36   ` Bart Van Assche
2025-04-07 10:17 ` [PATCH RFT v3 3/3] ufs: core: delegate the interrupt service routine to a threaded irq handler Neil Armstrong
2025-04-07 19:44   ` Bart Van Assche
2025-07-21 12:04   ` André Draszik
2025-07-21 12:10     ` André Draszik [this message]
2025-07-21 15:28     ` Bart Van Assche
2025-07-22  9:22       ` André Draszik
2025-07-24  9:55         ` André Draszik
2025-07-28 23:11   ` Nitin Rawat
2025-04-12  1:25 ` [PATCH RFT v3 0/3] ufs: core: cleanup and " Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4935395591bc8baef39d2acc491c6c40889090d9.camel@linaro.org \
    --to=andre.draszik@linaro.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=neil.armstrong@linaro.org \
    --cc=peter.griffin@linaro.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=willmcvicker@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).