From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Jann Horn <jannh@google.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vincent Donnefort <vdonnefort@google.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Kees Cook <kees@kernel.org>, Tony Luck <tony.luck@intel.com>,
"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
linux-hardening@vger.kernel.org,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH v2 1/2] tracing: ring-buffer: Have the ring buffer code do the vmap of physical memory
Date: Tue, 1 Apr 2025 11:53:17 +0200 [thread overview]
Message-ID: <Z-u3jW1zdqic9IKy@gmail.com> (raw)
In-Reply-To: <CAHk-=wjijTKpotANjhqoKrEFh=B=RLrfGWa7OFB2WJ9RU8jaaA@mail.gmail.com>
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Mon, 31 Mar 2025 at 18:40, Steven Rostedt <rostedt@goodmis.org> wrote:
> > >
> > > I think 'pfn' was introduced as a name ong long ago because it was
> > > what the alpha architecture used in the VM documentation. It probably
> > > predates that too, but it's where I got it from, iirc.
> > >
> >
> > It is old, as I remember using it when I first started Linux kernel
> > development back in 1998.
>
> So I did the alpha port in '95, but I meant that the 'page frame
> number' as a name may well have roots that go much further back. I
> only know it from the alpha architecture docs.
>
> Google only seems to find the modern Linux use, but I wouldn't be
> surprised if the alpha architects got it from some much older use (I
> would suspect VMS).
*Technically*, for those of us with a weakness for Git archeology, the
'PFN' term was first introduced in Linux with the MIPS port, which went
upstream via Linux 1.1.45, released on 1994/04/06, and had this in
include/asm-mips/mipsregs.h:
+/*
+ * Compute a vpn/pfn entry for EntryHi register
+ */
+#define VPN(addr,pagesizeshift) ((addr) & ~((1 << (pagesizeshift))-1))
+#define PFN(addr,pagesizeshift) (((addr) & ((1 << (pagesizeshift))-1)) << 6)
... while your Alpha port went upstream via 1.1.57, released on
1994/10/24, and the first mention of 'PFN' was in arch/alpha/mm/init.c,
introduced as part of 1.1.82, released 1995/01/16, almost a year later:
+unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
..
+ unsigned long pfn, nr;
+ if (cluster->usage & 1)
+ continue;
+ pfn = cluster->start_pfn;
+ nr = cluster->numpages;
So you don't appear to have dibs on the PFN name within Linux, although
I suspect MIPS and Alpha had it from a similar background. :-)
By the way, some quick review feedback on that patch: there should be
extra newlines after variable declarations - clearly the author is not
a good kernel programm... oh, never mind.
Thanks,
Ingo
next prev parent reply other threads:[~2025-04-01 9:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 14:34 [PATCH v2 0/2] ring-buffer: Allow persistent memory to be user space mmapped Steven Rostedt
2025-03-31 14:34 ` [PATCH v2 1/2] tracing: ring-buffer: Have the ring buffer code do the vmap of physical memory Steven Rostedt
2025-03-31 16:55 ` Linus Torvalds
2025-03-31 17:39 ` Steven Rostedt
2025-03-31 19:12 ` Linus Torvalds
2025-03-31 20:58 ` Steven Rostedt
2025-03-31 21:42 ` Linus Torvalds
2025-03-31 23:42 ` Steven Rostedt
2025-04-01 0:09 ` Jann Horn
2025-04-01 1:02 ` Steven Rostedt
2025-04-01 1:28 ` Jann Horn
2025-04-01 1:50 ` Steven Rostedt
2025-04-01 2:23 ` Mathieu Desnoyers
2025-04-01 1:30 ` Linus Torvalds
2025-04-01 1:41 ` Steven Rostedt
2025-04-01 1:55 ` Linus Torvalds
2025-04-01 9:53 ` Ingo Molnar [this message]
2025-04-01 0:11 ` Linus Torvalds
2025-04-01 0:27 ` Linus Torvalds
2025-04-01 0:30 ` Steven Rostedt
2025-04-01 0:38 ` Linus Torvalds
2025-04-01 0:49 ` Linus Torvalds
2025-04-01 1:36 ` Steven Rostedt
2025-04-01 1:44 ` Linus Torvalds
2025-04-03 5:59 ` Herbert Xu
2025-04-03 16:47 ` Linus Torvalds
2025-04-01 9:56 ` Mike Rapoport
2025-04-01 15:11 ` Steven Rostedt
2025-04-01 15:26 ` Mike Rapoport
2025-04-01 15:54 ` Steven Rostedt
2025-04-01 17:58 ` Mike Rapoport
2025-04-03 16:45 ` Kees Cook
2025-04-03 16:51 ` Linus Torvalds
2025-04-03 17:15 ` Steven Rostedt
2025-03-31 14:34 ` [PATCH v2 2/2] ring-buffer: Allow persistent ring buffers to be mmapped Steven Rostedt
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=Z-u3jW1zdqic9IKy@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gpiccoli@igalia.com \
--cc=jannh@google.com \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
--cc=vdonnefort@google.com \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).