mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branches 'slab/cleanups', 'slab/failslab', 'slab/fixes' and 'slub/percpu' into slab-for-linus
This commit is contained in:
commit
e2b093f3e9
7 changed files with 146 additions and 260 deletions
13
mm/slab.c
13
mm/slab.c
|
|
@ -935,7 +935,6 @@ static int transfer_objects(struct array_cache *to,
|
|||
|
||||
from->avail -= nr;
|
||||
to->avail += nr;
|
||||
to->touched = 1;
|
||||
return nr;
|
||||
}
|
||||
|
||||
|
|
@ -983,13 +982,11 @@ static struct array_cache **alloc_alien_cache(int node, int limit, gfp_t gfp)
|
|||
|
||||
if (limit > 1)
|
||||
limit = 12;
|
||||
ac_ptr = kmalloc_node(memsize, gfp, node);
|
||||
ac_ptr = kzalloc_node(memsize, gfp, node);
|
||||
if (ac_ptr) {
|
||||
for_each_node(i) {
|
||||
if (i == node || !node_online(i)) {
|
||||
ac_ptr[i] = NULL;
|
||||
if (i == node || !node_online(i))
|
||||
continue;
|
||||
}
|
||||
ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d, gfp);
|
||||
if (!ac_ptr[i]) {
|
||||
for (i--; i >= 0; i--)
|
||||
|
|
@ -2963,8 +2960,10 @@ retry:
|
|||
spin_lock(&l3->list_lock);
|
||||
|
||||
/* See if we can refill from the shared array */
|
||||
if (l3->shared && transfer_objects(ac, l3->shared, batchcount))
|
||||
if (l3->shared && transfer_objects(ac, l3->shared, batchcount)) {
|
||||
l3->shared->touched = 1;
|
||||
goto alloc_done;
|
||||
}
|
||||
|
||||
while (batchcount > 0) {
|
||||
struct list_head *entry;
|
||||
|
|
@ -3101,7 +3100,7 @@ static bool slab_should_failslab(struct kmem_cache *cachep, gfp_t flags)
|
|||
if (cachep == &cache_cache)
|
||||
return false;
|
||||
|
||||
return should_failslab(obj_size(cachep), flags);
|
||||
return should_failslab(obj_size(cachep), flags, cachep->flags);
|
||||
}
|
||||
|
||||
static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
|
||||
|
|
|
|||
Loading…
Reference in a new issue