Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36148
b: refs/heads/master
c: de3083e
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Sep 27, 2006
1 parent f3e0af3 commit 47c4e33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: 0fd0e6b05aa096622f151cac2f81f2e6844fb1bb
refs/heads/master: de3083ec3e6bfb1ab60bc8a410f37702529f953c
19 changes: 9 additions & 10 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,14 +3028,6 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
void *objp;
struct array_cache *ac;

#ifdef CONFIG_NUMA
if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) {
objp = alternate_node_alloc(cachep, flags);
if (objp != NULL)
return objp;
}
#endif

check_irq_off();
ac = cpu_cache_get(cachep);
if (likely(ac->avail)) {
Expand All @@ -3053,12 +3045,19 @@ static __always_inline void *__cache_alloc(struct kmem_cache *cachep,
gfp_t flags, void *caller)
{
unsigned long save_flags;
void *objp;
void *objp = NULL;

cache_alloc_debugcheck_before(cachep, flags);

local_irq_save(save_flags);
objp = ____cache_alloc(cachep, flags);

#ifdef CONFIG_NUMA
if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY)))
objp = alternate_node_alloc(cachep, flags);
#endif

if (!objp)
objp = ____cache_alloc(cachep, flags);
local_irq_restore(save_flags);
objp = cache_alloc_debugcheck_after(cachep, flags, objp,
caller);
Expand Down

0 comments on commit 47c4e33

Please sign in to comment.