mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
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:
parent
dada123d99
commit
b7a49f0d4c
2 changed files with 12 additions and 8 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue