From e6b6f87f08345e8e14d168fb59e9316742137fe9 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 7 Dec 2012 20:29:45 +0100 Subject: kern/slab: rework buffer-to-slab lookup Instead of using a red-black tree, rely on the VM system to store kmem specific private data. --- kern/slab.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'kern/slab.h') diff --git a/kern/slab.h b/kern/slab.h index bbd9d41..64daa61 100644 --- a/kern/slab.h +++ b/kern/slab.h @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -120,8 +119,7 @@ struct kmem_buftag { * Page-aligned collection of unconstructed buffers. */ struct kmem_slab { - struct list list_node; - struct rbtree_node tree_node; + struct list node; unsigned long nr_refs; union kmem_bufctl *first_free; void *addr; @@ -162,7 +160,7 @@ typedef void (*kmem_slab_free_fn_t)(vm_offset_t, vm_size_t); #define KMEM_CF_NO_CPU_POOL 0x1 /* CPU pool layer disabled */ #define KMEM_CF_SLAB_EXTERNAL 0x2 /* Slab data is off slab */ #define KMEM_CF_VERIFY 0x4 /* Debugging facilities enabled */ -#define KMEM_CF_DIRECT 0x8 /* No buf-to-slab tree lookup */ +#define KMEM_CF_DIRECT 0x8 /* Quick buf-to-slab lookup */ /* * Cache of objects. @@ -185,7 +183,6 @@ struct kmem_cache { struct list node; /* Cache list linkage */ struct list partial_slabs; struct list free_slabs; - struct rbtree active_slabs; int flags; size_t bufctl_dist; /* Distance from buffer to bufctl */ size_t slab_size; -- cgit v1.2.3