aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2016-12-12 19:41:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 21:55:07 -0500
commitbf00bd3458041c4643a13d80fb349d29cb66eb63 (patch)
tree743f4b6e25be9e4f5fbfb4d4c3472cd83b299cad /mm/slab.h
parentf728b0a5d72ae99c446f933912914a61254c03b6 (diff)
mm, slab: maintain total slab count instead of active count
Rather than tracking the number of active slabs for each node, track the total number of slabs. This is a minor improvement that avoids active slab tracking when a slab goes from free to partial or partial to free. For slab debugging, this also removes an explicit free count since it can easily be inferred by the difference in number of total objects and number of active objects. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1612042020110.115755@chino.kir.corp.google.com Signed-off-by: David Rientjes <rientjes@google.com> Suggested-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Greg Thelen <gthelen@google.com> Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 26123c512fee..de6579dc362c 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -447,8 +447,8 @@ struct kmem_cache_node {
447 struct list_head slabs_partial; /* partial list first, better asm code */ 447 struct list_head slabs_partial; /* partial list first, better asm code */
448 struct list_head slabs_full; 448 struct list_head slabs_full;
449 struct list_head slabs_free; 449 struct list_head slabs_free;
450 unsigned long active_slabs; /* length of slabs_partial+slabs_full */ 450 unsigned long total_slabs; /* length of all slab lists */
451 unsigned long free_slabs; /* length of slabs_free */ 451 unsigned long free_slabs; /* length of free slab list only */
452 unsigned long free_objects; 452 unsigned long free_objects;
453 unsigned int free_limit; 453 unsigned int free_limit;
454 unsigned int colour_next; /* Per-node cache coloring */ 454 unsigned int colour_next; /* Per-node cache coloring */