[PATCH -rt] NUMA-Q fix to __cache_free and reap_alien

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

diff -urpNa -X dontdiff linux-2.6.17-rt1/mm/slab.c linux-2.6.17-rt1-alienfix/mm/slab.c
--- linux-2.6.17-rt1/mm/slab.c	2006-06-22 14:12:08.000000000 -0700
+++ linux-2.6.17-rt1-alienfix/mm/slab.c	2006-06-22 14:45:56.000000000 -0700
@@ -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);
 			}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux