[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d04b6fac0c94bc460cd070bea0e999a24a52b583.1495603536.git.viresh.kumar@linaro.org>
Date: Wed, 24 May 2017 10:59:57 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>
Subject: [PATCH 6/6] sched: cpufreq: Optimize cpufreq_update_this_cpu() a bit
smp_processor_id() can result in a function call if CONFIG_DEBUG_PREEMPT
is enabled. It would be much straight forward to use this_rq() macro
instead.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
kernel/sched/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index bcdf6a136c59..4220ec76d643 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1995,7 +1995,7 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
static inline void cpufreq_update_this_cpu(struct rq *rq, unsigned int flags)
{
- if (cpu_of(rq) == smp_processor_id())
+ if (rq == this_rq())
cpufreq_update_util(rq, flags);
}
#else
--
2.13.0.70.g6367777092d9
Powered by blists - more mailing lists