slub: Determine gfpflags once and not every time a slab is allocated
Currently we determine the gfp flags to pass to the page allocator each time a slab is being allocated. Determine the bits to be set at the time the slab is created. Store in a new allocflags field and add the flags in allocate_slab(). Acked-by: Mel Gorman <mel@csn.ul.ie> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Christoph Lameter <clameter@sgi.com>
This commit is contained in:

committed by
Christoph Lameter

parent
dada123d99
commit
b7a49f0d4c
@@ -71,6 +71,7 @@ struct kmem_cache {
|
||||
|
||||
/* Allocation and freeing of slabs */
|
||||
int objects; /* Number of objects in slab */
|
||||
gfp_t allocflags; /* gfp flags to use on each alloc */
|
||||
int refcount; /* Refcount for slab cache destroy */
|
||||
void (*ctor)(struct kmem_cache *, void *);
|
||||
int inuse; /* Offset to metadata */
|
||||
|
Reference in New Issue
Block a user