summaryrefslogtreecommitdiff
path: root/vm/vm_external.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-12-10 21:52:40 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-15 12:43:27 +0200
commitf070e81f33c7f01a70923782b5358d014712d9ef (patch)
tree8ceb5b8852c111558d394b002d71fc34bc421996 /vm/vm_external.c
parent0b0d06c34589595cec2bea6f9b55b8e9ae51c3cf (diff)
kern/slab: directmap update
The main impact of the direct physical mapping on the kmem module is the slab size computation. The page allocator requires the allocation size to be a power-of-two above the page size since it uses the buddy memory allocation algorithm. Custom slab allocation functions are no longer needed since the only user was the kentry area, which has been removed recently. The KMEM_CACHE_NOCPUPOOL flag is also no longer needed since CPU pools, which are allocated from a kmem cache, can now always be allocated out of the direct physical mapping.
Diffstat (limited to 'vm/vm_external.c')
-rw-r--r--vm/vm_external.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/vm/vm_external.c b/vm/vm_external.c
index 2e2593b..03ebcfb 100644
--- a/vm/vm_external.c
+++ b/vm/vm_external.c
@@ -137,14 +137,18 @@ void vm_external_module_initialize(void)
{
vm_size_t size = (vm_size_t) sizeof(struct vm_external);
- kmem_cache_init(&vm_external_cache, "vm_external", size, 0,
- NULL, NULL, NULL, 0);
-
- kmem_cache_init(&vm_object_small_existence_map_cache,
- "small_existence_map", SMALL_SIZE, 0,
- NULL, NULL, NULL, 0);
-
- kmem_cache_init(&vm_object_large_existence_map_cache,
- "large_existence_map", LARGE_SIZE, 0,
- NULL, NULL, NULL, 0);
+ kmem_cache_init (&vm_external_cache,
+ "vm_external",
+ size, 0,
+ NULL, 0);
+
+ kmem_cache_init (&vm_object_small_existence_map_cache,
+ "small_existence_map",
+ SMALL_SIZE, 0,
+ NULL, 0);
+
+ kmem_cache_init (&vm_object_large_existence_map_cache,
+ "large_existence_map",
+ LARGE_SIZE, 0,
+ NULL, 0);
}