Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Gregory Haskins <ghaskins <at> novell.com>
Subject: [PATCH] RT: Only dirty a cacheline if the priority is actually changing
Newsgroups: gmane.linux.rt.user
Date: Wednesday 17th October 2007 18:54:25 UTC (over 9 years ago)
Oops...forgot to refresh this patch before mailing it.  Heres the actual
patch.


----


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

Signed-off-by: Gregory Haskins <[email protected]>
---

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

diff --git a/kernel/sched.c b/kernel/sched.c
index 8c916de..d5dfe21 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -368,7 +368,8 @@ static DEFINE_MUTEX(sched_hotcpu_mutex);
 #if defined(CONFIG_PREEMPT_RT) && defined(CONFIG_SMP)
 static inline void set_rq_prio(struct rq *rq, int prio)
 {
-	rq->highest_prio = prio;
+	if (rq->highest_prio != prio)
+		rq->highest_prio = prio;
 }
 
 static inline void update_rq_prio(struct rq *rq)
 
CD: 4ms