Re: [RFC PATCH] mmc: meson-mx-sdhc: add DMA bounce buffer support

From: Ulf Hansson

Date: Tue Nov 10 2026 - 08:49:49 EST


On Sun, Nov 1, 2026 at 11:52 PM Martin Blumenstingl
<martin.blumenstingl@xxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> On Sun, Nov 1, 2026 at 9:55 AM HELPMEEADICE <yuanzhenpeng210@xxxxxxxxx> wrote:
> >
> > Hi Martin,
> >
> > Thank you again for your feedback!
> >
> > I've completed the comparison between the original driver,
> > MMC_CAP2_MERGE_CAPABLE, and the 128 KiB bounce buffer implementation
> > on my Xunlei OneCloud (Amlogic S805).
> >
> > The results show that MMC_CAP2_MERGE_CAPABLE alone does not improve
> > performance on this platform.
> >
> > Runtime instrumentation confirmed that:
> >
> > - dma_get_merge_boundary() returns 0.
> > - host->can_dma_map_merge remains 0.
> I see, so that will prevent it from doing anything.
>
> > - The block queue's max_segments remains 1.
> > - The merge-only variant behaves essentially the same as the original driver.
> >
> > Here are the sequential read results (MiB/s, mean of 5 runs):
> >
> > Baseline Merge-only Bounce
> > 4 KiB 11.81 12.20 13.01
> > 64 KiB 12.88 12.80 57.52
> > 128 KiB 12.97 12.80 67.68
> > 1 MiB 13.11 13.05 69.43
> >
> > The bounce buffer improves sequential read throughput by up to 5.3x
> > and sequential write throughput by up to 2.1x.
> Let's wait for Ulf's feedback in the next few days if it's something
> that should go into MMC core (either by default or opt-in) or if we
> should keep it driver specific.

I think I need to see an updated patch to see whether it makes sense
to move this to the mmc core. And even it would, we can always apply
it and make rework on top.

Kind regards
Uffe