slub.c:early_kmem_cache_node_alloc() shouldn't be __init
Subsystems (2)
PATCH 1/1 slub.c:early_kmem_cache_node_alloc() shouldn't be __init
This patch fixes the following section mismatch:
<-- snip -->
...
MODPOST vmlinux
WARNING: mm/built-in.o(.text+0x24bd3): Section mismatch: reference to .init.text:early_kmem_cache_node_alloc (between 'init_kmem_cache_nodes' and 'calculate_sizes')
...
<-- snip -->
---
mm/slub.c renamed from mm/slub.c.old +2 -2
@@ -1882,8 +1882,8 @@* Note that this function only works on the kmalloc_node_cache * when allocating for the kmalloc_node_cache. */ -static struct kmem_cache_node *__init early_kmem_cache_node_alloc (gfp_t gfpflags, -int node) +static struct kmem_cache_node *early_kmem_cache_node_alloc (gfp_t gfpflags, +int node) {struct page *page;struct kmem_cache_node *n;
Quoted 1 line · Adrian Bunk
This patch fixes the following section mismatch:
Nack.
Can you remove the warning? early_kmem_cache_node_alloc is only used during bootstrap. But it is called from a function that is also used later.
Quoted 9 lines · Christoph Lameter
Quoted 1 line · Adrian Bunk
This patch fixes the following section mismatch:
Nack.
Can you remove the warning?
early_kmem_cache_node_allocis only used during bootstrap. But it is called from a function that is also used later.
The alternative is "noinline __init_refok" - the noinline is required because modern gcc versions already make it non-__init by inlining it into init_kmem_cache_nodes() without.
But I'm not convinced it's really worth manually forcing noinline only for moving a few bytes to __init in the CONFIG_NUMA=y case - in the long term this will only bit rot.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedChristoph Lameter
Acked-byQuoted 3 lines · Adrian Bunk
But I'm not convinced it's really worth manually forcing noinline only for moving a few bytes to
__initin theCONFIG_NUMA=ycase - in the long term this will only bit rot.
Allright then