From: Jisheng Zhang <jszhang@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
Fei Xie <fei.xie@horizon.auto>
Subject: Re: [PATCH 0/3] spi: cadence-xspi: add DMA support
Date: Tue, 17 Nov 2026 13:07:28 +0800 [thread overview]
Message-ID: <avvhEI2gYHK6ayf-@xhacker> (raw)
In-Reply-To: <avsRgCbjzFVdS9GI@nsa>
On Mon, Nov 16, 2026 at 02:26:33PM +0000, Nuno Sá wrote:
> On Sat, Nov 07, 2026 at 03:20:41PM +0800, Jisheng Zhang wrote:
> > This series tries to improve the cadence-xspi cpu usage and potential
> > performance if the allocated dmaengine is powerful.
> >
> > But no matter the dmaengine performance is powerful or not, the cpu
> > usage is reduced a lot.
> >
> > For example, on a dual CA55 platform, test with looping the following
> > cmd:
> > dd if=/dev/mtd0 of=/dev/null bs=8192
> >
> > Before the patch:
> > cpu usage is nearly 50%, which means one CA55 is full loaded with
> > the sdma io copy.
> >
> > After the patch:
> > cpu usage is between 0 ~ 1%
> >
> > patch1 documents the dt-binding
> > patch2 adds the memcpy dmaengine support
> > patch3 uses writel_relaxed for cmd regs.
> >
> > Jisheng Zhang (3):
> > spi: dt-bindings: cdns,xspi: Add DMA properties
> > spi: cadence-xspi: Support dmaengine for sdma io copy
> > spi: cadence-xspi: Use writel_relaxed() for cmd regs
> >
> > .../devicetree/bindings/spi/cdns,xspi.yaml | 13 ++
> > drivers/spi/spi-cadence-xspi.c | 149 +++++++++++++++++-
> > 2 files changed, 155 insertions(+), 7 deletions(-)
> >
> > --
> > 2.55.0
> >
>
> Hi Jisheng,
>
> I could run some tests on my platform. Here is the dump:
>
> MTD=mtd4 SZ=$((16*1024*1024)) RUNS=5 sh xspi-dma-bench.sh
> mtd4: mtd4: 08000000 00020000 "xspi0-nor", testing 16777216 bytes at offset 117440512, 1 cpus
> === STIG + CPU (use_dma=0)
>
> write 14.32 s 1.17 MB/s cpu 100.0% (1.00 of 1 cores)
> write (read back via other path): data OK
> read #1 0.35 s 47.93 MB/s cpu 100.0% (1.00 of 1 cores)
> read #2 0.35 s 47.93 MB/s cpu 100.0% (1.00 of 1 cores)
> read #3 0.34 s 49.34 MB/s cpu 100.0% (1.00 of 1 cores)
> read #4 0.34 s 49.34 MB/s cpu 100.0% (1.00 of 1 cores)
> read #5 0.34 s 49.34 MB/s cpu 100.0% (1.00 of 1 cores)
> read: data OK
> === STIG + MDMA (use_dma=1)
> write 14.39 s 1.17 MB/s cpu 100.0% (1.00 of 1 cores)
> write (read back via other path): data OK
> read #1 0.37 s 45.34 MB/s cpu 70.3% (0.70 of 1 cores)
> read #2 0.37 s 45.34 MB/s cpu 68.6% (0.69 of 1 cores)
> read #3 0.37 s 45.34 MB/s cpu 69.7% (0.70 of 1 cores)
> read #4 0.36 s 46.60 MB/s cpu 70.3% (0.70 of 1 cores)
> read #5 0.36 s 46.60 MB/s cpu 66.7% (0.67 of 1 cores)
> read: data OK
>
> The script is a LLM based one :). Might have some slop but given the
> results are more or less what I expected (the data performance also goes
> in line with flash_test), did not bother too much in
> checking it in much detail.
>
> So, cpu load is where we have the actual win.
>
> The test ran on an octal spi-nor
>
Thank you so much!
next prev parent reply other threads:[~2026-11-17 5:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 7:20 [PATCH 0/3] spi: cadence-xspi: add DMA support Jisheng Zhang
2026-11-07 7:20 ` [PATCH 1/3] spi: dt-bindings: cdns,xspi: Add DMA properties Jisheng Zhang
2026-11-07 8:01 ` sashiko-bot
2026-11-07 7:20 ` [PATCH 2/3] spi: cadence-xspi: Support dmaengine for sdma io copy Jisheng Zhang
2026-11-07 7:51 ` sashiko-bot
2026-11-07 7:20 ` [PATCH 3/3] spi: cadence-xspi: Use writel_relaxed() for cmd regs Jisheng Zhang
2026-11-16 14:26 ` [PATCH 0/3] spi: cadence-xspi: add DMA support Nuno Sá
2026-11-17 5:07 ` Jisheng Zhang [this message]
2026-11-16 21:03 ` Mark Brown
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=avvhEI2gYHK6ayf-@xhacker \
--to=jszhang@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fei.xie@horizon.auto \
--cc=krzk+dt@kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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