Thread (23 messages) 23 messages, 4 authors, 2020-08-22

Re: [PATCH v5 5/8] mm: HUGE_VMAP arch support cleanup

From: Christophe Leroy <hidden>
Date: 2020-08-21 12:44:22
Also in: linux-arch, linux-mm, lkml


Le 21/08/2020 à 12:39, Nicholas Piggin a écrit :
Excerpts from Christophe Leroy's message of August 21, 2020 3:40 pm:
quoted

Le 21/08/2020 à 06:44, Nicholas Piggin a écrit :
quoted
This changes the awkward approach where architectures provide init
functions to determine which levels they can provide large mappings for,
to one where the arch is queried for each call.

This removes code and indirection, and allows constant-folding of dead
code for unsupported levels.
I think that in order to allow constant-folding of dead code for
unsupported levels, you must define arch_vmap_xxx_supported() as static
inline in a .h

If you have them in .c files, you'll get calls to tiny functions that
will always return false, but will still be called and dead code won't
be eliminated. And performance wise, that's probably not optimal either.
Yeah that's true actually, I think I didn't find a good place to add
the prototypes in the arch code but I'll have another look and either
rewrite the changelog or remove it. Although this does get a step closer
at least.
linux/vmalloc.h includes asm/vmalloc.h
Should it go there ?

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help