Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319556
b: refs/heads/master
c: 57d437d
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Jun 1, 2012
1 parent 757eb1f commit 2d3953f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: f6e7def7f7d749759e4bf36dcc25ae289a20d868
refs/heads/master: 57d437d2aa680f42d75cef45205834d5f605550a
10 changes: 6 additions & 4 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2050,10 +2050,10 @@ static void flush_all(struct kmem_cache *s)
* Check if the objects in a per cpu structure fit numa
* locality expectations.
*/
static inline int node_match(struct kmem_cache_cpu *c, int node)
static inline int node_match(struct page *page, int node)
{
#ifdef CONFIG_NUMA
if (node != NUMA_NO_NODE && page_to_nid(c->page) != node)
if (node != NUMA_NO_NODE && page_to_nid(page) != node)
return 0;
#endif
return 1;
Expand Down Expand Up @@ -2226,7 +2226,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
goto new_slab;
redo:

if (unlikely(!node_match(c, node))) {
if (unlikely(!node_match(page, node))) {
stat(s, ALLOC_NODE_MISMATCH);
deactivate_slab(s, page, c->freelist);
c->page = NULL;
Expand Down Expand Up @@ -2313,6 +2313,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
{
void **object;
struct kmem_cache_cpu *c;
struct page *page;
unsigned long tid;

if (slab_pre_alloc_hook(s, gfpflags))
Expand All @@ -2338,7 +2339,8 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
barrier();

object = c->freelist;
if (unlikely(!object || !node_match(c, node)))
page = c->page;
if (unlikely(!object || !node_match(page, node)))

object = __slab_alloc(s, gfpflags, node, addr, c);

Expand Down

0 comments on commit 2d3953f

Please sign in to comment.