Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319552
b: refs/heads/master
c: 188fd06
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Jun 1, 2012
1 parent e58ddfe commit 347322f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f469743673ceda5181970eb6b8090ba728c956fb
refs/heads/master: 188fd063208942a4681d8e8a4484ad0d4ae0fda1
16 changes: 9 additions & 7 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2130,9 +2130,15 @@ static inline void *new_slab_objects(struct kmem_cache *s, gfp_t flags,
int node, struct kmem_cache_cpu **pc)
{
void *freelist;
struct kmem_cache_cpu *c;
struct page *page = new_slab(s, flags, node);
struct kmem_cache_cpu *c = *pc;
struct page *page;

freelist = get_partial(s, flags, node, c);

if (freelist)
return freelist;

page = new_slab(s, flags, node);
if (page) {
c = __this_cpu_ptr(s->cpu_slab);
if (c->page)
Expand Down Expand Up @@ -2269,11 +2275,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
goto redo;
}

/* Then do expensive stuff like retrieving pages from the partial lists */
freelist = get_partial(s, gfpflags, node, c);

if (!freelist)
freelist = new_slab_objects(s, gfpflags, node, &c);
freelist = new_slab_objects(s, gfpflags, node, &c);

if (unlikely(!freelist)) {
if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
Expand Down

0 comments on commit 347322f

Please sign in to comment.