Thread (11 messages) 11 messages, 3 authors, 2021-03-25

Re: [PATCH v2 3/4] mm/vmalloc: Use kvmalloc to allocate the table of pages

From: David Rientjes <rientjes@google.com>
Date: 2021-03-24 19:05:25
Also in: lkml

On Wed, 24 Mar 2021, Matthew Wilcox (Oracle) wrote:
If we're trying to allocate 4MB of memory, the table will be 8KiB in size
(1024 pointers * 8 bytes per pointer), which can usually be satisfied
by a kmalloc (which is significantly faster).  Instead of changing this
open-coded implementation, just use kvmalloc().

This improves the allocation speed of vmalloc(4MB) by approximately
5% in our benchmark.  It's still dominated by the 1024 calls to
alloc_pages_node(), which will be the subject of a later patch.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: David Rientjes <rientjes@google.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help