[PATCH 09/13] RT: Only dirty a cacheline if the priority is actually changing

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Gregory Haskins
Date: Tuesday, October 23, 2007 - 9:51 am

We can avoid dirtying a rq related cacheline with a simple check, so why not.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 kernel/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index e536142..1058a1f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -376,7 +376,8 @@ static inline void update_rq_prio(struct rq *rq)
 	struct rt_prio_array *array = &rq->rt.active;
 	int                   prio  = sched_find_first_bit(array->bitmap);
 
-	set_rq_prio(rq, prio);
+	if (rq->highest_prio != prio)
+		set_rq_prio(rq, prio);
 }
 
 #else

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

Messages in current thread:
[PATCH 00/13] Balance RT tasks v5, Gregory Haskins, (Tue Oct 23, 9:50 am)
[PATCH 01/13] RT: push-rt, Gregory Haskins, (Tue Oct 23, 9:50 am)
[PATCH 03/13] RT: Add a per-cpu rt_overload indication, Gregory Haskins, (Tue Oct 23, 9:50 am)
[PATCH 05/13] RT: Initialize the priority value, Gregory Haskins, (Tue Oct 23, 9:50 am)
[PATCH 06/13] RT: Maintain the highest RQ priority, Gregory Haskins, (Tue Oct 23, 9:50 am)
[PATCH 07/13] RT: Clean up some of the push-rt logic, Gregory Haskins, (Tue Oct 23, 9:50 am)
[PATCH 09/13] RT: Only dirty a cacheline if the priority i ..., Gregory Haskins, (Tue Oct 23, 9:51 am)
[PATCH 10/13] RT: Fixes for push-rt patch, Gregory Haskins, (Tue Oct 23, 9:51 am)
[PATCH 11/13] RT: Condense NORMAL and IDLE priorities, Gregory Haskins, (Tue Oct 23, 9:51 am)
[PATCH 12/13] RT: CPU priority management, Gregory Haskins, (Tue Oct 23, 9:51 am)