Re: [GIT PULL] ring-buffer: Updates for v6.15

From: Linus Torvalds
Date: Thu Mar 27 2025 - 22:18:05 EST


On Thu, 27 Mar 2025 at 19:01, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> Let me explain this better. Yes it uses alloc_page() but that's just an
> intermediate function. What is saved is the page_address(page), as that
> is what is used by the code.

I understood.

But NO, that is *not* what is used by the code.

You literally use "struct page *" whenever you want to mmap it.

If the *only* thing that was used was the virtual address, this
wouldn't be a discussion.

As it is, you allocate it in form A, then you turn it into *either*
form B or C, and then when you need form A again you turn it back. And
you do so in a particularly disgusting and random way.

> The virtual address needs to be created as that's all the code cares
> about.

Stop LYING.

If that was "all the code cared about" we'd not have this discussion.

It clearly wants things *back* as 'struct page' again. Stop making
shit up and maki9ng excuses for your bad code.

And yes, it would probably be fine to just keep it as *both* in parallel.

But honestly, if you only save one thing - as you currently do - you
should save the thing that is more fundamental.

That's 'struct page *'. That's the allocation, that's the thing you
need for mmap, and that's what you *should* have used for
de-allocation too (even if I think you currently just end up using the
virtual mapping and depend on the VM code undoing your mapping).

Anyway, I'm not arguing any more. I'm telling you that this code will

(a) not be pulled this merge window

(b) not be pulled EVER unless you clean it up

(c) you need to stop with this hackery

Apparently you knew it was ugly hackery, since you said "I figured
this would be the most controversial", so it wasn't a surprise to you
that I'm complaining.

Why did you send it then? Because I'm serious - this has been a
pattern, and I AM DONE.

Next time, I won't bother to explain why I'm not pulling, because
apparently even when I explain, you just start making excuses and
making more garbage up.

Next time, you're going in the spam filter.

Because it's annoying that I have to go through your pull requests so
carefully, but what makes me truly fed up is that this KEEPS
HAPPENING, and then when I complain you just start arguing about it
even though you seem to have been aware that the code was shit.

Linus