提交 c17fd13e 编写于 作者: W Wanpeng Li 提交者: Pekka Enberg

mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo

Use existing interface node_nr_slabs and node_nr_objs to get
nr_slabs and nr_objs.
Acked-by: NChristoph Lameter <cl@linux.com>
Signed-off-by: NWanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: NPekka Enberg <penberg@kernel.org>
上级 a4463364
...@@ -5277,8 +5277,8 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo) ...@@ -5277,8 +5277,8 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
if (!n) if (!n)
continue; continue;
nr_slabs += atomic_long_read(&n->nr_slabs); nr_slabs += node_nr_slabs(n);
nr_objs += atomic_long_read(&n->total_objects); nr_objs += node_nr_objs(n);
nr_free += count_partial(n, count_free); nr_free += count_partial(n, count_free);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册