From a8fd18db14cb2fd1f595be9f560fe18efb966774 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sun, 7 Feb 2016 11:57:49 +0100 Subject: Remove kmem map Now that the slab allocator doesn't use kernel virtual memory any more, this map has become irrelevant. * kern/slab.c (KMEM_MAP_SIZE): Remove macro. (kmem_map_store, kmem_map): Remove variables. (slab_init): Remove call kmem_submap. * kern/slab.h (kmem_map): Remove extern declaration. --- kern/slab.c | 13 ------------- kern/slab.h | 5 ----- 2 files changed, 18 deletions(-) diff --git a/kern/slab.c b/kern/slab.c index d18c10b4..e5e44f40 100644 --- a/kern/slab.c +++ b/kern/slab.c @@ -150,11 +150,6 @@ */ #define KMEM_REDZONE_BYTE 0xbb -/* - * Size of the VM submap from which default backend functions allocate. - */ -#define KMEM_MAP_SIZE (128 * 1024 * 1024) - /* * Shift for the first kalloc cache size. */ @@ -263,12 +258,6 @@ static struct list kmem_cache_list; static unsigned int kmem_nr_caches; static simple_lock_data_t __attribute__((used)) kmem_cache_list_lock; -/* - * VM submap for slab caches. - */ -static struct vm_map kmem_map_store; -vm_map_t kmem_map = &kmem_map_store; - /* * Time of the last memory reclaim, in clock ticks. */ @@ -1239,8 +1228,6 @@ void slab_init(void) size_t i, size; #endif /* SLAB_USE_CPU_POOLS */ - kmem_submap(kmem_map, kernel_map, &min, &max, KMEM_MAP_SIZE, FALSE); - #if SLAB_USE_CPU_POOLS for (i = 0; i < ARRAY_SIZE(kmem_cpu_pool_types); i++) { cpu_pool_type = &kmem_cpu_pool_types[i]; diff --git a/kern/slab.h b/kern/slab.h index c50efd3d..51f29a90 100644 --- a/kern/slab.h +++ b/kern/slab.h @@ -192,11 +192,6 @@ struct kmem_cache { typedef struct kmem_cache *kmem_cache_t; #define KMEM_CACHE_NULL ((kmem_cache_t) 0) -/* - * VM submap for slab allocations. - */ -extern vm_map_t kmem_map; - /* * Cache initialization flags. */ -- cgit v1.2.3