Tracks arenas and slabs on tailqs
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 9 Nov 2016 16:12:52 +0000 (11:12 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commitc6cc1a433f544371db7b2571b935989c6e074df0
tree4c3d8f2b2b16b48c2324ccef68edac05899104f4
parentf24ffd4fca6318d3b4d515408ba802d1b9126213
Tracks arenas and slabs on tailqs

Both lists are protected by the arenas_and_slabs qlock.  The all_arenas
list will be useful for #mem.  The all_kmem_caches might not be useful,
since all caches always have a source arena.  It's fine for diagnostics
for now.

The important thing is that the existence and importing links are all
managed by the same lock, so things like reclaim and #mem device ops can
happen without worrying about the read-mostly structure changing.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/arena.h
kern/include/slab.h
kern/src/arena.c
kern/src/slab.c