|
@@ -205,8 +205,8 @@ struct kmem_cache {
|
|
|
|
|
|
#ifdef CONFIG_SLUB
|
|
#ifdef CONFIG_SLUB
|
|
/*
|
|
/*
|
|
- * SLUB allocates up to order 2 pages directly and otherwise
|
|
|
|
- * passes the request to the page allocator.
|
|
|
|
|
|
+ * SLUB directly allocates requests fitting in to an order-1 page
|
|
|
|
+ * (PAGE_SIZE*2). Larger requests are passed to the page allocator.
|
|
*/
|
|
*/
|
|
#define KMALLOC_SHIFT_HIGH (PAGE_SHIFT + 1)
|
|
#define KMALLOC_SHIFT_HIGH (PAGE_SHIFT + 1)
|
|
#define KMALLOC_SHIFT_MAX (MAX_ORDER + PAGE_SHIFT)
|
|
#define KMALLOC_SHIFT_MAX (MAX_ORDER + PAGE_SHIFT)
|
|
@@ -217,12 +217,12 @@ struct kmem_cache {
|
|
|
|
|
|
#ifdef CONFIG_SLOB
|
|
#ifdef CONFIG_SLOB
|
|
/*
|
|
/*
|
|
- * SLOB passes all page size and larger requests to the page allocator.
|
|
|
|
|
|
+ * SLOB passes all requests larger than one page to the page allocator.
|
|
* No kmalloc array is necessary since objects of different sizes can
|
|
* No kmalloc array is necessary since objects of different sizes can
|
|
* be allocated from the same page.
|
|
* be allocated from the same page.
|
|
*/
|
|
*/
|
|
-#define KMALLOC_SHIFT_MAX 30
|
|
|
|
#define KMALLOC_SHIFT_HIGH PAGE_SHIFT
|
|
#define KMALLOC_SHIFT_HIGH PAGE_SHIFT
|
|
|
|
+#define KMALLOC_SHIFT_MAX 30
|
|
#ifndef KMALLOC_SHIFT_LOW
|
|
#ifndef KMALLOC_SHIFT_LOW
|
|
#define KMALLOC_SHIFT_LOW 3
|
|
#define KMALLOC_SHIFT_LOW 3
|
|
#endif
|
|
#endif
|