Fix for the "kmem -S" command for kernels that are configured with

CONFIG_SLUB.  Eash per-cpu slab object dump may show incorrect
ALLOCATED and FREE values; and as seen on Linux 3.5 and later
kernels, the TOTAL value and the number of individual objects dumped
may also be incorrect (too small).
(anderson@redhat.com)
 Please enter the c mmit message for your changes. Lines starting
This commit is contained in:
Dave Anderson 2014-01-29 15:06:53 -05:00
parent bc21fc9263
commit 6a3ba6ae7b

View File

@ -17257,14 +17257,11 @@ do_slab_slub(struct meminfo *si, int verbose)
cpu_slab = i;
/*
* Later slub scheme uses the per-cpu freelist
* and keeps page->inuse maxed out, so count
* the free objects by hand.
* so count the free objects by hand.
*/
if (cpu_freelist)
freelist = cpu_freelist;
if ((si->objects - inuse) == 0)
inuse = si->objects -
count_free_objects(si, freelist);
inuse = si->objects - count_free_objects(si, freelist);
break;
}
}