Re: [PATCH v5 3/4] tracing: Use vmap_page_range() to map memmap ring buffer

From: Linus Torvalds
Date: Wed Apr 02 2025 - 12:42:27 EST


On Tue, 1 Apr 2025 at 15:57, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> The code to map the physical memory retrieved by memmap currently
> allocates an array of pages to cover the physical memory and then calls
> vmap() to map it to a virtual address. Instead of using this temporary
> array of struct page descriptors, simply use vmap_page_range() that can
> directly map the contiguous physical memory to a virtual address.

Wait, what?

Didn't you just say that you can just use page_address() for the kernel mapping?

So the whole vmap thing is entirely unnecessary in the first place.

Including the simpler vmap_page_range().

Linus