i-kitayama@xxxxxxxxxxxxx wrote:
Hi Dave,
Thanks for reviewing.
For 2.6.22 only, kmem_cache_node.full is always there, so in that
case, the SLAB_STORE_USER flag would never get checked above, and
the full slab would be shown as "(empty)".
And for 2.6.23 kernels and above, the SLAB_STORE_USER flag
would *only* be checked if CONFIG_SLUB_DEBUG was *not* set.
And if CONFIG_SLUB_DEBUG is not set, then full slabs would not
be tracked because add_full() is a no-op -- regardless whether
the SLAB_STORE_USER flag was set or not.
Shouldn't it be "||" instead of "&&"?
Right. I have attached the modified patch.
Itaru
I've made a couple additions (patch attached), but the
logic is the same -- queued for the next release.
Thanks,
Dave
Index: defs.h
===================================================================
RCS file: /nfs/projects/cvs/crash/defs.h,v
retrieving revision 1.343
diff -u -r1.343 defs.h
--- defs.h 17 Mar 2008 21:28:54 -0000 1.343
+++ defs.h 18 Mar 2008 13:42:23 -0000
@@ -1435,6 +1435,7 @@
long kmem_cache_cpu_freelist;
long kmem_cache_cpu_page;
long kmem_cache_cpu_node;
+ long kmem_cache_flags;
long zone_nr_active;
long zone_nr_inactive;
long zone_all_unreclaimable;
Index: memory.c
===================================================================
RCS file: /nfs/projects/cvs/crash/memory.c,v
retrieving revision 1.170
diff -u -r1.170 memory.c
--- memory.c 5 Mar 2008 20:32:33 -0000 1.170
+++ memory.c 18 Mar 2008 13:42:27 -0000
@@ -458,6 +458,7 @@
MEMBER_OFFSET_INIT(kmem_cache_cpu_slab, "kmem_cache", "cpu_slab");
MEMBER_OFFSET_INIT(kmem_cache_list, "kmem_cache", "list");
MEMBER_OFFSET_INIT(kmem_cache_name, "kmem_cache", "name");
+ MEMBER_OFFSET_INIT(kmem_cache_flags, "kmem_cache", "flags");
MEMBER_OFFSET_INIT(kmem_cache_cpu_freelist, "kmem_cache_cpu", "freelist");
MEMBER_OFFSET_INIT(kmem_cache_cpu_page, "kmem_cache_cpu", "page");
MEMBER_OFFSET_INIT(kmem_cache_cpu_node, "kmem_cache_cpu", "node");
@@ -13816,7 +13817,7 @@
static void
do_node_lists_slub(struct meminfo *si, ulong node_ptr, int node)
{
- ulong next, list_head;
+ ulong next, list_head, flags;
int first;
list_head = node_ptr + OFFSET(kmem_cache_node_partial);
@@ -13841,7 +13842,11 @@
return;
}
- if (INVALID_MEMBER(kmem_cache_node_full)) {
+#define SLAB_STORE_USER (0x00010000UL)
+ flags = ULONG(si->cache_buf + OFFSET(kmem_cache_flags));
+
+ if (INVALID_MEMBER(kmem_cache_node_full) ||
+ !(flags & SLAB_STORE_USER)) {
fprintf(fp, "NODE %d FULL:\n (not tracked)\n", node);
return;
}
Index: symbols.c
===================================================================
RCS file: /nfs/projects/cvs/crash/symbols.c,v
retrieving revision 1.160
diff -u -r1.160 symbols.c
--- symbols.c 17 Mar 2008 21:28:54 -0000 1.160
+++ symbols.c 18 Mar 2008 13:42:32 -0000
@@ -6618,6 +6618,8 @@
OFFSET(kmem_cache_cpu_page));
fprintf(fp, " kmem_cache_cpu_node: %ld\n",
OFFSET(kmem_cache_cpu_node));
+ fprintf(fp, " kmem_cache_flags: %ld\n",
+ OFFSET(kmem_cache_flags));
fprintf(fp, " net_device_next: %ld\n",
OFFSET(net_device_next));
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility