Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23509
b: refs/heads/master
c: e00946f
h: refs/heads/master
i:
  23507: 63b05fb
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Mar 25, 2006
1 parent 365d467 commit 2e0a645
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 3ded175a4b7a4548f3358dcf5f3ad65f63cdb4ed
refs/heads/master: e00946fe2351307eb3eda7a3343530f6d2d1af2e
11 changes: 9 additions & 2 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,13 @@ static void __drain_alien_cache(struct kmem_cache *cachep,

if (ac->avail) {
spin_lock(&rl3->list_lock);
/*
* Stuff objects into the remote nodes shared array first.
* That way we could avoid the overhead of putting the objects
* into the free lists and getting them back later.
*/
transfer_objects(rl3->shared, ac, ac->limit);

free_block(cachep, ac->entry, ac->avail, node);
ac->avail = 0;
spin_unlock(&rl3->list_lock);
Expand All @@ -986,8 +993,8 @@ static void reap_alien(struct kmem_cache *cachep, struct kmem_list3 *l3)

if (l3->alien) {
struct array_cache *ac = l3->alien[node];
if (ac && ac->avail) {
spin_lock_irq(&ac->lock);

if (ac && ac->avail && spin_trylock_irq(&ac->lock)) {
__drain_alien_cache(cachep, ac, node);
spin_unlock_irq(&ac->lock);
}
Expand Down

0 comments on commit 2e0a645

Please sign in to comment.