[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250402125548.02cc57d0@gandalf.local.home>
Date: Wed, 2 Apr 2025 12:55:48 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Masami
Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, Vincent Donnefort <vdonnefort@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>, Jann
Horn <jannh@...gle.com>
Subject: Re: [PATCH v5 3/4] tracing: Use vmap_page_range() to map memmap
ring buffer
On Wed, 2 Apr 2025 09:42:00 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> Wait, what?
>
> Didn't you just say that you can just use page_address() for the kernel mapping?
Correct. I misunderstood Mike when he created the reserve_mem and had it
return physical addresses. I didn't realize he had it already mapped via
the normal virtual mappings.
>
> So the whole vmap thing is entirely unnecessary in the first place.
>
> Including the simpler vmap_page_range().
Not entirely. The original code only used memmap=, which does require the
vmap_page_range(). The reserve_mem came later, and thinking it was just
physical address space (not a mapping), I just had it use the memmap code.
That is, the persistent memory buffer was originally created on top of the
memmap feature (and only for x86). I talked with Mike about making it more
generic and he and I worked out the reserve_mem option. Having the memmap
code already doing the vmap() I just had the reserve_mem version use the
same, not knowing that it could just use phys_to_virt().
This patch series fixes that miscommunication and separates out a memmap'ed
buffer from reserve_mem buffer and simplifies everything.
-- Steve
Powered by blists - more mailing lists