From: Leon Romanovsky <leon@kernel.org>
To: Stian Halseth <stian@itx.no>
Cc: Andreas Larsson <andreas@gaisler.com>,
"David S . Miller" <davem@davemloft.net>,
Marek Szyprowski <m.szyprowski@samsung.com>,
sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc64: Use relaxed ordering for DMA_FROM_DEVICE mappings on sun4v
Date: Tue, 13 Oct 2026 16:57:33 +0300 [thread overview]
Message-ID: <20261013135733.GO219304@unreal> (raw)
In-Reply-To: <20261013133731.1795299-1-stian@itx.no>
On Tue, Oct 13, 2026 at 03:37:30PM +0200, Stian Halseth wrote:
> sun4v IOMMU and ATU mappings carry a relaxed ordering attribute, but
> dma_4v_map_phys() and dma_4v_map_sg() set it only when the caller
> passes DMA_ATTR_WEAK_ORDERING. Some network drivers do, storage drivers
> do not. Without it every device write into memory is strictly ordered,
> which on a T7-1 (M7) caps DMA reads at about 280 MiB/s per PCIe device
> while writes run at full speed.
>
> Set the attribute for every DMA_FROM_DEVICE streaming mapping. Devices
> report completion through coherent memory or an interrupt, which stay
> strictly ordered, and a strictly ordered write does not pass the writes
> before it.
>
> T7-1, fio 1M sequential read, QD32:
>
> before after
> NVMe (PM1725, x4) 281 MiB/s 3169 MiB/s
> SATA SSD (mpt3sas) 278 MiB/s 502 MiB/s
>
> Closes: https://github.com/sparclinux/issues/issues/114
> Signed-off-by: Stian Halseth <stian@itx.no>
> ---
> Tested on a T7-1 (M7) and a T4-1:
>
> - T7: fresh RAID1 on two NVMe drives, 192 GB fio crc32c write+verify
> and md check: no errors, mismatch_cnt 0.
> - T7 and T4: file checksums on the SAS boot mirrors identical to a
> strictly ordered kernel; no new messages in dmesg.
> - 4k random read and sequential writes unchanged.
>
> arch/sparc/kernel/pci_sun4v.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Looks right to me.
Thanks,
Reviewed-by: Leon Romanovsky <leon@kernel.org>
next prev parent reply other threads:[~2026-10-13 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261013133752eucas1p1ad5d155a4dd8316d7a3da5cb7772af3f@eucas1p1.samsung.com>
2026-10-13 13:37 ` Stian Halseth
2026-10-13 13:57 ` Leon Romanovsky [this message]
2026-10-13 15:17 ` Marek Szyprowski
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=20261013135733.GO219304@unreal \
--to=leon@kernel.org \
--cc=andreas@gaisler.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sparclinux@vger.kernel.org \
--cc=stian@itx.no \
/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
all inboxes | Powered by JetHome®