Re: [PATCH] oom: add sysctl to enable slab memory dump

From: Christoph Lameter
Date: Wed Feb 22 2012 - 08:55:17 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/