NUMA-Q fix to __cache_free and reap_alien
PATCH 1/1 NUMA-Q fix to __cache_free and reap_alien
Hello!
The attached patch (no doubt quite crudely) fixes a couple of compiler errors on NUMA-Q machines. With these fixes, 2.6.17-rt1 builds, boots, and runs kernelbench and LTP on NUMA-Q.
Signed-off-by Paul E. McKenney <[email protected]>
---
slab.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
mm/slab.c +6 -5
@@ -1058,13 +1058,14 @@ static void reap_alien(struct kmem_cache *cachep, struct kmem_list3 *l3, int *this_cpu) { int node = per_cpu(reap_node, *this_cpu); +unsigned long flags;if (l3->alien) {struct array_cache *ac = l3->alien[node]; -if (ac && ac->avail &&spin_trylock_irq (&ac->lock)) { +if (ac && ac->avail &&spin_trylock_irqsave (&ac->lock, flags)) {__drain_alien_cache (cachep, ac, node, this_cpu); -spin_unlock_irq (&ac->lock); +spin_unlock_irqrestore (&ac->lock, flags); } } }
@@ -3242,15 +3243,15 @@ __cache_free(struct kmem_cache *cachep,spin_lock (&alien->lock);if (unlikely (alien->avail == alien->limit)) {STATS_INC_ACOVERFLOW (cachep); -__drain_alien_cache (cachep, - alien, nodeid); +__drain_alien_cache (cachep, alien, + nodeid, this_cpu); } alien->entry[alien->avail++] = objp;spin_unlock (&alien->lock); }else {spin_lock (&(cachep->nodelists[nodeid])-> list_lock); -free_block (cachep, &objp,1 , nodeid); +free_block (cachep, &objp,1 , nodeid, this_cpu);spin_unlock (&(cachep->nodelists[nodeid])-> list_lock); }
Ingo Molnar
AppliedQuoted 5 lines · Paul E. McKenney
Hello!
The attached patch (no doubt quite crudely) fixes a couple of compiler errors on NUMA-Q machines. With these fixes, 2.6.17-rt1 builds, boots, and runs kernelbench and LTP on NUMA-Q.
thanks, applied.
Ingo