> > While this is an improvement over your last post, there are still issues > with this patchset. I've been testing it with a wide range of stashed > vmcores, and I see problems with all of the old 2.6.24 vmcores. Those > kernels used an early version of CONFIG_SLUB which did not even have > the kmem_cache_node.total_objects field. However, given that the > kmem_cache_node.total_objects field is encapsulated within CONFIG_SLUB_DEBUG, > presumably the same problem would occur with a more recent kernel > if it was *not* configured with CONFIG_SLUB_DEBUG. > I have tried to fix this in the attached new version (and have done a rebase), but could not confirm that it fixes the problem, since I do not have a vmcore without total_objects, and with CONFIG_SLUB_DEBUG disabled "kmem -s" does not work. crash> kmem -s kmem: option requires kmem_cache_node.nr_slabs member! (the kernel must be built with CONFIG_SLUB_DEBUG) > > Other nits: > > Please fix these: > > $ make warn > ... [ cut ] ... > cc -c -g -DX86_64 -DLZO -DSNAPPY -DGDB_7_6 memory.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security > memory.c:17916:7: warning: no previous prototype for 'count_cpu_partial' [-Wmissing-prototypes] > short count_cpu_partial(struct meminfo *si, int cpu) > ^ > memory.c: In function 'get_kmem_cache_slub_data': > memory.c:17982:15: warning: unused variable 'free' [-Wunused-variable] > short inuse, free; > ... Done > > > In defs.h, please put the kmem_cache_node_total_objects offset_table entry at the end > of the structure so that it won't break extension modules that haven't been recompiled. Done > > And lastly, add the display of the kmem_cache_node_total_objects offset to the > dump_offset_table() function in symbols.c, which is used by "help -o". That would > be especially helpful in this case so a user can verify whether the field even > exists in the kernel being analyzed. You can put its output line next to the other > kmem_cache_node offsets. > Done Thanks, Vinayak
Attachment:
0001-Fix-for-the-wrong-calculation-of-slub-total-and-inus.patch
Description: Binary data
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility