From 069b4fb65ec13741c40356c16c312a50771fb589 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 5 Jan 2014 19:51:11 +0100 Subject: kern: explain the significance of the chosen length * kern/slab.h (KMEM_CACHE_NAME_SIZE): Explain the significance of the chosen length. --- kern/slab.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kern/slab.h') diff --git a/kern/slab.h b/kern/slab.h index a4219c4..fd65893 100644 --- a/kern/slab.h +++ b/kern/slab.h @@ -147,7 +147,9 @@ typedef vm_offset_t (*kmem_slab_alloc_fn_t)(vm_size_t); typedef void (*kmem_slab_free_fn_t)(vm_offset_t, vm_size_t); /* - * Cache name buffer size. + * Cache name buffer size. The size is chosen so that struct + * kmem_cache fits into two cache lines. The size of a cache line on + * a typical CPU is 64 bytes. */ #define KMEM_CACHE_NAME_SIZE 24 -- cgit v1.2.3