public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, dipankar@in.ibm.com,
	johnstul@us.ibm.com, tytso@us.ibm.com, dvhltc@us.ibm.com
Subject: [PATCH -rt] NUMA-Q fix to __cache_free and reap_alien
Date: Thu, 22 Jun 2006 16:35:12 -0700	[thread overview]
Message-ID: <20060622233512.GA2792@us.ibm.com> (raw)

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

             reply	other threads:[~2006-06-22 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 23:35 Paul E. McKenney [this message]
2006-06-23  6:50 ` [PATCH -rt] NUMA-Q fix to __cache_free and reap_alien Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060622233512.GA2792@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhltc@us.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tytso@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox