From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
vbabka@kernel.org, harry.yoo@oracle.com,
akpm@linux-foundation.org, hao.li@linux.dev, cl@gentwo.org,
rientjes@google.com, roman.gushchin@linux.dev,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, stern@rowland.harvard.edu,
linux@roeck-us.net, hch@lst.de, Jeff.kirsher@gmail.com,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH] mm/slab: align kmalloc to cacheline when DMA API debugging is active
Date: Fri, 27 Mar 2026 14:34:58 +0200 [thread overview]
Message-ID: <CAHp75Ved0H=QE0CDfThdOexi0BE2JKrcmTnv1GQJyrf0_-M9fg@mail.gmail.com> (raw)
In-Reply-To: <acZ3ZUXhFHpSXzYS@arm.com>
On Fri, Mar 27, 2026 at 2:26 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
> On Fri, Mar 27, 2026 at 10:58:46AM +0500, Mikhail Gavrilov wrote:
> TL;DR: I think this is fine:
>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
>
> I'm not sure that's the best way to hide the warning but there
> are no great solutions either. On one hand, we want the DMA debug to
> capture potential problems on architectures it's not running on. OTOH,
> we also want to avoid false positives on coherent architectures/devices.
> I don't think reconciling the two requirements is easy.
>
> When DMA_API_DEBUG is enabled, the above will change the x86 behaviour
> that could have implications beyond DMA (e.g. may not catch some buffer
> overflow because it's within L1_CACHE_BYTES). Similarly for non-coherent
> architectures that select DMA_BOUNCE_UNALIGNED_KMALLOC (arm64 and riscv
> currently). arm64 defines ARCH_DMA_MINALIGN to 128 but
> ARCH_KMALLOC_MINALIGN to 8 (why 128 is larger than L1_CACHE_BYTES is
> another matter but let's ignore it for now).
Maybe for the cases where we do not warn we should introduce a
dev_dbg_/pr_debug_once()? At least users may be informed about potential issues.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-27 12:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 5:58 Mikhail Gavrilov
2026-03-27 6:37 ` Harry Yoo (Oracle)
2026-03-27 6:50 ` Mikhail Gavrilov
2026-03-27 8:00 ` Harry Yoo (Oracle)
2026-03-27 8:07 ` Mikhail Gavrilov
2026-03-27 8:43 ` Harry Yoo (Oracle)
2026-03-27 10:25 ` Mikhail Gavrilov
2026-03-27 10:39 ` Harry Yoo (Oracle)
2026-03-27 6:41 ` Guenter Roeck
2026-03-27 12:26 ` Catalin Marinas
2026-03-27 12:34 ` Andy Shevchenko [this message]
2026-03-27 14:09 ` Marek Szyprowski
2026-03-27 14:30 ` Vlastimil Babka (SUSE)
2026-03-27 14:37 ` Mikhail Gavrilov
2026-03-27 14:41 ` Marek Szyprowski
2026-03-27 14:55 ` 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='CAHp75Ved0H=QE0CDfThdOexi0BE2JKrcmTnv1GQJyrf0_-M9fg@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=Jeff.kirsher@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=cl@gentwo.org \
--cc=hao.li@linux.dev \
--cc=harry.yoo@oracle.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=m.szyprowski@samsung.com \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=rientjes@google.com \
--cc=robin.murphy@arm.com \
--cc=roman.gushchin@linux.dev \
--cc=stern@rowland.harvard.edu \
--cc=vbabka@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