Re: [GIT PULL] dma-mapping updates for Linux 6.6

From: Christoph Hellwig
Date: Wed Aug 30 2023 - 14:29:22 EST


On Tue, Aug 29, 2023 at 08:54:43PM -0700, Linus Torvalds wrote:
> > Yajun Deng (2):
> > dma-contiguous: support per-numa CMA for all architectures
>
> What?
>
> This commit seems entirely bogus and is actively misleading.
>
> It claims to enable support for per-numa CMA for all architectures.
>
> It does no such thing.

It actually does..

> All it does is to change the default value for a config option. It was
> perfectly available before, now it is - incorrectly - made 'default y'
> in case the config supports NUME at all.

It also changes the default, and maybe that shouldn't have been,
but that's not the meat of the change. The big part of the change
is that the logic to actually reserve the per-node CMA area is now
called from common code instead of arm64 code. Before you could have
enable the option, but it wouldn't have worked at all.

>
> There seems to be no real reason to change the default value of this
> config option. The commit message most definitely doesn't argue for
> it, since it talks about something entirely different than what the
> code changes does.
>
> I have taken this, but I protest these kinds of nonsensical changes.
> That commit is actively misleading and confused, and I think the
> default value for that config option should just be 'n' on all
> architectures.
>
> Why is this option so important that it should be enabled just because
> some minimal NUMA support might be enabled?
>
> Please don't add these kinds of hidden "default y" by making them
> default on some much more common option instead.

I think everyone including the maintainer was confused when the initial
arm64 only version was merged by adding the default, it should have
been a depends to start with. So we'll change this to a depends in a
follow up.