jiffies is declared as a volatile variable. Therefore it is not neccessary to
use ACCESS_ONCE() while reading it.

Signed-off-by: Pranith Kumar <[email protected]>
---
 kernel/sched/core.c | 2 +-
 kernel/sched/proc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ec1a286..381d0d0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2552,7 +2552,7 @@ void scheduler_tick(void)
 u64 scheduler_tick_max_deferment(void)
 {
        struct rq *rq = this_rq();
-       unsigned long next, now = ACCESS_ONCE(jiffies);
+       unsigned long next, now = jiffies;
 
        next = rq->last_sched_tick + HZ;
 
diff --git a/kernel/sched/proc.c b/kernel/sched/proc.c
index 8ecd552..87ab31b 100644
--- a/kernel/sched/proc.c
+++ b/kernel/sched/proc.c
@@ -526,7 +526,7 @@ static inline unsigned long get_rq_runnable_load(struct rq 
*rq)
  */
 void update_idle_cpu_load(struct rq *this_rq)
 {
-       unsigned long curr_jiffies = ACCESS_ONCE(jiffies);
+       unsigned long curr_jiffies = jiffies;
        unsigned long load = get_rq_runnable_load(this_rq);
        unsigned long pending_updates;
 
@@ -548,7 +548,7 @@ void update_idle_cpu_load(struct rq *this_rq)
 void update_cpu_load_nohz(void)
 {
        struct rq *this_rq = this_rq();
-       unsigned long curr_jiffies = ACCESS_ONCE(jiffies);
+       unsigned long curr_jiffies = jiffies;
        unsigned long pending_updates;
 
        if (curr_jiffies == this_rq->last_load_update_tick)
-- 
1.9.1

--
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/

Reply via email to