----- Original Message -----
Hi all,
I'm wondering about the use of the kernel 'nr_node_ids' variable in
memory.c. In kmem_cache_downsize(), vt->kmem_cache_len_nodes defaults
to 1 when 'nr_node_ids' isn't present. But in vm_init() an error
message is printed in the same case. The reason I'm asking is that I'm
getting that error
"unable to initialize kmem slab cache subsystem"
on a 3.4 kernel. Having vm_init() default to
vt->kmem_cache_len_nodes=1
as well seems to bring up the slab subsystem, although I'm getting a
couple of
"kmem: vm_area_struct: full list: slab: <nn1> bad next pointer:
<nn2>"
mixed into my kmem -S output. I have no idea if it's related.
Hi Per,
I don't have any recent sample kernels that have the configuration that your
kernel is running, so I can't confidently answer/test this. I presume that
your kernel does not configure CONFIG_NODES_SHIFT (or set it to 0), so
that nr_node_ids becomes a #define instead of a variable. And to get it
to work, I'm also presuming that you changed the "else" clause in vm_init()
to something like this:
if (MEMBER_TYPE("kmem_cache", "nodelists") ==
TYPE_CODE_PTR) {
int nr_node_ids;
/*
* nodelists now a pointer to an outside array
*/
vt->flags |= NODELISTS_IS_PTR;
if (kernel_symbol_exists("nr_node_ids")) {
get_symbol_data("nr_node_ids", sizeof(int),
&nr_node_ids);
vt->kmem_cache_len_nodes = nr_node_ids;
} else {
- error(INFO, "nr_node_ids: symbol does not
exist\n");
- error(INFO, "unable to initialize kmem slab cache
subsystem\n\n");
- vt->flags |= KMEM_CACHE_UNAVAIL;
+ vt->kmem_cache_len_nodes = 1;
}
That looks reasonable to me.
As far as the "kmem -S" output, are you running it on a live system?
Dave