Re: [PATCH v3 4/8] powerpc/mm: skip kmap for lowmem pages in __dma_sync_page()
From: IBM
Date: Thu Nov 19 2026 - 12:20:45 EST
Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> writes:
> With CONFIG_HIGHMEM enabled, __dma_sync_page() unconditionally goes
> through __dma_sync_page_highmem(), which disables interrupts and
> kmaps the buffer one page at a time. This adds needless per-page
> overhead to every streaming DMA sync on such kernels.
>
> Use the per-page kmap path only when the buffer reaches into highmem
> and do a single __dma_sync() on the linear mapping otherwise.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> ---
> arch/powerpc/mm/dma-noncoherent.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
Thanks for taking care of this. LGTM.
Feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx>