Thread (34 messages) 34 messages, 5 authors, 2021-01-26

Re: [PATCH v10 01/12] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-01-24 11:33:27
Also in: linux-arch, linuxppc-dev, lkml

On Sun, Jan 24, 2021 at 06:22:19PM +1000, Nicholas Piggin wrote:
vmalloc_to_page returns NULL for addresses mapped by larger pages[*].
Whether or not a vmap is huge depends on the architecture details,
alignments, boot options, etc., which the caller can not be expected
to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page.

This change teaches vmalloc_to_page about larger pages, and returns
the struct page that corresponds to the offset within the large page.
This makes the API agnostic to mapping implementation details.
Maybe enable instead of fix would be better in the subject line?

Otherwise this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help