summaryrefslogtreecommitdiff
path: root/kern/slab.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2012-12-07 20:29:45 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-28 15:48:04 +0200
commit3d7a59680e7d500de23403ade0f5d07adaa9f229 (patch)
tree3927cc70503e895a08aa95d0e5f21fdbda910872 /kern/slab.h
parent89ea8fc44d2e07f9611c65a1181cec2bb80d29c2 (diff)
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.
Diffstat (limited to 'kern/slab.h')
-rw-r--r--kern/slab.h7
1 files changed, 2 insertions, 5 deletions
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 <cache.h>
#include <kern/lock.h>
#include <kern/list.h>
-#include <kern/rbtree.h>
#include <mach/machine/vm_types.h>
#include <sys/types.h>
#include <vm/vm_types.h>
@@ -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;