Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261649
b: refs/heads/master
c: 61728d1
h: refs/heads/master
i:
  261647: 24cd2e4
v: v3
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Jul 2, 2011
1 parent 412b357 commit 9659cbf
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 5cc6eee8a8c1aefe9c86fe7345a2aa1c4ca70dc6
refs/heads/master: 61728d1efc927eccfa64c50ede4998a8765805c3
15 changes: 8 additions & 7 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,8 +1457,8 @@ static inline void remove_partial(struct kmem_cache_node *n,
*
* Must hold list_lock.
*/
static inline int lock_and_freeze_slab(struct kmem_cache_node *n,
struct page *page)
static inline int lock_and_freeze_slab(struct kmem_cache *s,
struct kmem_cache_node *n, struct page *page)
{
if (slab_trylock(page)) {
remove_partial(n, page);
Expand All @@ -1470,7 +1470,8 @@ static inline int lock_and_freeze_slab(struct kmem_cache_node *n,
/*
* Try to allocate a partial slab from a specific node.
*/
static struct page *get_partial_node(struct kmem_cache_node *n)
static struct page *get_partial_node(struct kmem_cache *s,
struct kmem_cache_node *n)
{
struct page *page;

Expand All @@ -1485,7 +1486,7 @@ static struct page *get_partial_node(struct kmem_cache_node *n)

spin_lock(&n->list_lock);
list_for_each_entry(page, &n->partial, lru)
if (lock_and_freeze_slab(n, page))
if (lock_and_freeze_slab(s, n, page))
goto out;
page = NULL;
out:
Expand Down Expand Up @@ -1536,7 +1537,7 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)

if (n && cpuset_zone_allowed_hardwall(zone, flags) &&
n->nr_partial > s->min_partial) {
page = get_partial_node(n);
page = get_partial_node(s, n);
if (page) {
put_mems_allowed();
return page;
Expand All @@ -1556,7 +1557,7 @@ static struct page *get_partial(struct kmem_cache *s, gfp_t flags, int node)
struct page *page;
int searchnode = (node == NUMA_NO_NODE) ? numa_node_id() : node;

page = get_partial_node(get_node(s, searchnode));
page = get_partial_node(s, get_node(s, searchnode));
if (page || node != NUMA_NO_NODE)
return page;

Expand Down Expand Up @@ -2081,7 +2082,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
{
void *prior;
void **object = (void *)x;
unsigned long flags;
unsigned long uninitialized_var(flags);

local_irq_save(flags);
slab_lock(page);
Expand Down

0 comments on commit 9659cbf

Please sign in to comment.