public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -rt] NUMA-Q fix to __cache_free and reap_alien
@ 2006-06-22 23:35 Paul E. McKenney
  2006-06-23  6:50 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Paul E. McKenney @ 2006-06-22 23:35 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, dipankar, johnstul, tytso, dvhltc

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 <paulmck@us.ibm.com>
---

 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);
 			}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -rt] NUMA-Q fix to __cache_free and reap_alien
  2006-06-22 23:35 [PATCH -rt] NUMA-Q fix to __cache_free and reap_alien Paul E. McKenney
@ 2006-06-23  6:50 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2006-06-23  6:50 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: linux-kernel, dipankar, johnstul, tytso, dvhltc


* Paul E. McKenney <paulmck@us.ibm.com> wrote:

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-23  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 23:35 [PATCH -rt] NUMA-Q fix to __cache_free and reap_alien Paul E. McKenney
2006-06-23  6:50 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox