Re: [PATCH v2] mm/slab: Improve performance of gathering slabinfo stats
From: aruna . ramakrishna
Date: Wed Aug 17 2016 - 03:15:37 EST
On 08/16/2016 08:52 AM, Christoph Lameter wrote:
On Tue, 16 Aug 2016, Joonsoo Kim wrote:
In SLUB, nr_slabs is manipulated without holding a lock so atomic
operation should be used.
It could be moved under the node lock.
Christoph, Joonsoo,
I agree that nr_slabs could be common between SLAB and SLUB, but I think
that should be a separate patch, since converting nr_slabs to unsigned
long for SLUB will cause quite a bit of change in mm/slub.c that is not
related to adding counters to SLAB.
I'll send out an updated slab counters patch with Joonsoo's suggested
fix tomorrow (nr_slabs will be unsigned long for SLAB only, and there
will be a separate definition for SLUB), and once that's in, I'll create
a new patch that makes nr_slabs common for SLAB and SLUB, and also
converts total_objects to unsigned long. Maybe it can include some more
cleanup too. Does that sound acceptable?
Thanks,
Aruna