diff options
Diffstat (limited to 'library/slabinfo.c')
-rw-r--r-- | library/slabinfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/slabinfo.c b/library/slabinfo.c index a4386d6..1d4453f 100644 --- a/library/slabinfo.c +++ b/library/slabinfo.c @@ -434,6 +434,10 @@ static int parse_slabinfo20 ( if (node->obj_size > slabs->max_obj_size) slabs->max_obj_size = node->obj_size; + /* cache_size is not accurate, it's the upper limit of memory used by this slab. + * When system using slub(most common case) is under high memory pressure, there + * are slab order fallbacks, which means pages_per_slab is not constant and may decrease. + */ node->cache_size = (unsigned long)node->nr_slabs * node->pages_per_slab * page_size; if (node->nr_objs) { |