Messages in this thread Patch in this message |  | | From | Sripathi Kodi <> | Subject | [PATCH] Inline double_unlock_balance() | Date | Wed, 5 Nov 2008 18:57:14 +0530 |
| |
Hi,
We have a test case which measures the variation in the amount of time needed to perform a fixed amount of work on the preempt_rt kernel. We started seeing deterioration in it's performance recently. The test should never take more than 10 microseconds, but we started 5-10% failure rate. Using elimination method, we traced the problem to commit 1b12bbc747560ea68bcc132c3d05699e52271da0 (lockdep: re-annotate scheduler runqueues). When LOCKDEP is disabled, this patch only adds an additional function call to double_unlock_balance(). Hence I inlined double_unlock_balance() and the problem went away. Here is a patch to make this change.
Thanks, Sripathi.
lockdep: Inline double_unlock_balance()
Additional function call for double_unlock_balance() causes latency problems for some test cases on the preempt_rt kernel.
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Index: linux-2.6.27.4/kernel/sched.c =================================================================== --- linux-2.6.27.4.orig/kernel/sched.c 2008-11-05 05:01:01.000000000 -0800 +++ linux-2.6.27.4/kernel/sched.c 2008-11-05 05:01:20.000000000 -0800 @@ -2812,7 +2812,7 @@ return ret; } -static void double_unlock_balance(struct rq *this_rq, struct rq *busiest) +static inline void double_unlock_balance(struct rq *this_rq, struct rq *busiest) __releases(busiest->lock) { spin_unlock(&busiest->lock);
|  |