Re: 2.6.26-rt1

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Friday, August 1, 2008 - 2:11 pm

On Wed, Jul 30, 2008 at 11:01:32AM +0200, Jürgen Mell wrote:

The following patch should clear things up.  It is against 2.6.25.8-rt7,
but should still apply.

------------------------------------------------------------------------

Disable preemption around statistics for RCU boost and unboost calls.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 rcupreempt-boost.c |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff -urpNa -X dontdiff linux-2.6.25.8-rt7/kernel/rcupreempt-boost.c linux-2.6.25.8-rt7-preemptfix/kernel/rcupreempt-boost.c
--- linux-2.6.25.8-rt7/kernel/rcupreempt-boost.c	2008-06-24 14:14:52.000000000 -0700
+++ linux-2.6.25.8-rt7-preemptfix/kernel/rcupreempt-boost.c	2008-06-24 14:38:59.000000000 -0700
@@ -205,11 +205,23 @@ RCU_BOOST_TRACE_FUNC_DECL(boost_readers)
 RCU_BOOST_TRACE_FUNC_DECL(try_unboost_readers)
 RCU_BOOST_TRACE_FUNC_DECL(unboost_readers)
 RCU_BOOST_TRACE_FUNC_DECL(over_taken)
+static void rcu_trace_boost_boost_called_preempt(void)
+{
+	preempt_disable();
+	rcu_trace_boost_boost_called(RCU_BOOST_ME);
+	preempt_enable();
+}
+static void rcu_trace_boost_unboost_called_preempt(void)
+{
+	preempt_disable();
+	rcu_trace_boost_unboost_called(RCU_BOOST_ME);
+	preempt_enable();
+}
 #else /* CONFIG_RCU_TRACE */
 /* These were created by the above macro "RCU_BOOST_TRACE_FUNC_DECL" */
-# define rcu_trace_boost_task_boost_called(rbd) do { } while (0)
+# define rcu_trace_boost_task_boost_called_preempt(rbd) do { } while (0)
 # define rcu_trace_boost_task_boosted(rbd) do { } while (0)
-# define rcu_trace_boost_boost_called(rbd) do { } while (0)
+# define rcu_trace_boost_boost_called_preempt(rbd) do { } while (0)
 # define rcu_trace_boost_try_boost(rbd) do { } while (0)
 # define rcu_trace_boost_boosted(rbd) do { } while (0)
 # define rcu_trace_boost_unboost_called(rbd) do { } while (0)
@@ -261,7 +273,7 @@ void __rcu_preempt_boost(void)
 
 	WARN_ON(!current->rcu_read_lock_nesting);
 
-	rcu_trace_boost_boost_called(RCU_BOOST_ME);
+	rcu_trace_boost_boost_called_preempt();
 
 	/* check to see if we are already boosted */
 	if (unlikely(rcu_is_boosted(curr)))
@@ -313,7 +325,7 @@ void __rcu_preempt_unboost(void)
 	int prio;
 	unsigned long flags;
 
-	rcu_trace_boost_unboost_called(RCU_BOOST_ME);
+	rcu_trace_boost_unboost_called_preempt();
 
 	/* if not boosted, then ignore */
 	if (likely(!rcu_is_boosted(curr)))

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.24.7-rt15, Thomas Gleixner, (Fri Jul 25, 1:09 pm)
Re: 2.6.24.7-rt15, Carsten Emde, (Sat Jul 26, 4:03 am)
2.6.24.7-rt16, Thomas Gleixner, (Sun Jul 27, 9:16 am)
Re: 2.6.24.7-rt16, Avuton Olrich, (Sun Jul 27, 1:28 pm)
Re: 2.6.24.7-rt16, Thomas Gleixner, (Sun Jul 27, 1:37 pm)
Re: 2.6.24.7-rt16, Wolfgang Grandegger, (Mon Jul 28, 1:12 am)
Re: 2.6.24.7-rt16, Peter Zijlstra, (Mon Jul 28, 2:48 am)
Re: 2.6.24.7-rt16, Wolfgang Grandegger, (Mon Jul 28, 3:12 am)
Re: 2.6.24.7-rt16, Thomas Gleixner, (Tue Jul 29, 5:57 am)
2.6.26-rt1, Thomas Gleixner, (Tue Jul 29, 3:21 pm)
Re: 2.6.26-rt1, Jürgen Mell, (Wed Jul 30, 2:01 am)
Re: 2.6.26-rt1, John Kacur, (Wed Jul 30, 7:31 am)
Re: 2.6.26-rt1, Ryan Hope, (Wed Jul 30, 7:41 am)
[PATCH] Fix Bug messages, Chirag Jog, (Wed Jul 30, 10:18 am)
Re: [PATCH] Fix Bug messages, Jürgen Mell, (Wed Jul 30, 1:16 pm)
Re: [PATCH] Fix Bug messages, Peter Zijlstra, (Wed Jul 30, 11:06 pm)
Re: [PATCH] Fix Bug messages, Sebastien Dugue, (Thu Jul 31, 1:00 am)
Re: [PATCH] Fix Bug messages, John Kacur, (Thu Jul 31, 3:13 am)
Re: [PATCH] Fix Bug messages, Sebastien Dugue, (Thu Jul 31, 4:23 am)
Re: [PATCH] Fix Bug messages, John Kacur, (Thu Jul 31, 6:49 am)
Re: [PATCH] Fix Bug messages, Peter Zijlstra, (Thu Jul 31, 7:01 am)
Re: [PATCH] Fix Bug messages, John Kacur, (Thu Jul 31, 7:10 am)
Re: [PATCH] Fix Bug messages, Peter Zijlstra, (Thu Jul 31, 7:18 am)
Re: [PATCH] Fix Bug messages, Sebastien Dugue, (Thu Jul 31, 7:35 am)
Re: [PATCH] Fix Bug messages, Clark Williams, (Thu Jul 31, 8:01 am)
Re: [PATCH] Fix Bug messages, Sebastien Dugue, (Thu Jul 31, 8:14 am)
Re: 2.6.26-rt1, Paul E. McKenney, (Fri Aug 1, 2:11 pm)
Re: 2.6.26-rt1, Paul E. McKenney, (Fri Aug 1, 2:11 pm)
Re: 2.6.26-rt1, Juergen Beisert, (Mon Aug 11, 1:36 am)
Re: 2.6.26-rt1, Juergen Beisert, (Wed Aug 13, 6:30 am)
Re: 2.6.26-rt1, Paul E. McKenney, (Wed Aug 13, 9:37 am)