[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wh5wWeib7+kVHpBVtUn7kx7GGadWqb5mW5FYTdewEfL=w@mail.gmail.com>
Date: Sat, 16 Mar 2024 09:59:57 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Beau Belgrave <beaub@...ux.microsoft.com>,
Chengming Zhou <zhouchengming@...edance.com>, Huang Yiwei <quic_hyiwei@...cinc.com>,
John Garry <john.g.garry@...cle.com>, Randy Dunlap <rdunlap@...radead.org>,
Thorsten Blum <thorsten.blum@...lux.com>, Vincent Donnefort <vdonnefort@...gle.com>,
linke li <lilinke99@...com>, Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: Re: [GIT PULL] tracing: Updates for v6.9
On Sat, 16 Mar 2024 at 09:31, Linus Torvalds
<torvalds@...ux-foundation.org> 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
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.
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.
but the effect of that is likely fairly small.
Linus
Powered by blists - more mailing lists