Commit 29d18b52 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] slab: avoid higher-order allocations

From: Manfred Spraul <manfred@colorfullife.com>

At present slab is using 2-order allocations for the size-2048 cache.  Of
course, this can affect networking quite seriously.

The patch ensures that slab will never use more than a 1-order allocation
for objects which have a size of less than 2*PAGE_SIZE.
parent 349055d0
......@@ -445,8 +445,8 @@ static inline void **dbg_userword(kmem_cache_t *cachep, void *objp)
/*
* Do not go above this order unless 0 objects fit into the slab.
*/
#define BREAK_GFP_ORDER_HI 2
#define BREAK_GFP_ORDER_LO 1
#define BREAK_GFP_ORDER_HI 1
#define BREAK_GFP_ORDER_LO 0
static int slab_break_gfp_order = BREAK_GFP_ORDER_LO;
/* Macros for storing/retrieving the cachep and or slab from the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment