Re: [GIT PULL] tracing: Updates for v6.9

From: Steven Rostedt
Date: Sat Mar 16 2024 - 14:20:12 EST


On Sat, 16 Mar 2024 09:59:57 -0700
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Sat, 16 Mar 2024 at 09:31, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > So instead of merging a new feature that was mis-designed and is
> > already having code working around its mis-design, I'm not merging it
> > at all.
>
> Here's a clue: when hacking up VFS code, ask for ACK's from the VFS people.
>
> And when hacking up MM code, make damn sure that you have VM people involved.
>
> No more of this "random code that happens to work in my tests"
> garbage. Yes, I'm sure that others have done this same disgusting page
> counting hack and this was copied-and-pasted from some other

I admit that this was taken from looking at how other code did it.

> disgusting source, but because of all the history, I'm now looking at
> tracing pulls arefully, and I'm simply not allowing any broken hacks.

That's pretty obvious.

>
> So in addition to getting actual VM people to help you with mapping
> stuff (hard requirement), I would also suggest:
>
> - your allocation has to be live over the whole mmap (and that's due
> to other fundamental issues - you're not even trying to deal with
> actual dynamic allocations and thank Cthulhu for that), and the code
> is literally designed that way, so then faulting pages in one at a
> time and refcounting them one at a time is just pointless and wrong.
> Just do it all at mmap time.
>
> - I'd suggest marking it all VM_DONTCOPY | VM_IO | VM_DONTEXPAND to
> not let people play games with the mapping.
>
> - avoid all the sub-page ref-counts entirely by using VM_PFNMAP, and
> use vm_insert_pages()
>
> and a random note:
>
> - from a TLB pressure standpoint, it might be a good idea to try to
> keep the page table entries naturally aligned, so putting that one
> status page at the beginning is likely a bad idea. It will typically
> mean that hardware that can silently use larger TLB entries for
> aligned pages won't be able to do so.

This is actually something that I wanted to do, but how much to
allocate was stored in that status page. I could easily make the status
page as big as the sub-buffers themselves so that everything is
naturally aligned. The status pages states how big it is.

>
> but the effect of that is likely fairly small.

I'm not going to be able to get this done this week, but I don't want
the other changes not to be pulled. As the ring buffer mappings near
the beginning, what do you want me to do in the mean time?

1) Rebase without them (I know how much you love rebasing)

2) revert the entire series.

3) Just make it disabled.

-- Steve