lkml.org 
[lkml]   [2012]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] oom: add sysctl to enable slab memory dump
On Wed, 22 Feb 2012, Rafael Aquini wrote:

> --- a/mm/slub.c
> +++ b/mm/slub.c
> +void oom_dump_slabs(int ratio)
> +{

> +
> + for_each_online_node(node) {
> + struct kmem_cache_node *n = get_node(cachep, node);
> + if (!n)
> + continue;
> +
> + nr_objs += atomic_long_read(&n->total_objects);

Please use node_nr_objects() instead of directly accessing total_objects.
total_objects are only available if debugging support was compiled in.



\
 
 \ /
  Last update: 2012-02-22 14:57    [W:0.101 / U:1.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site