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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux