diff options
author | Liviu Dudau <Liviu.Dudau@arm.com> | 2012-11-16 18:32:38 +0000 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2012-12-05 17:19:40 +0530 |
commit | e8cceacd3913e3a3e955614bacc1bc81866bc243 (patch) | |
tree | bac0c7484c41a16c0ac7ff66779f47b37a402877 | |
parent | 9fddb442fff074adf508dc7c2e6e5b4d9d4d5ad5 (diff) |
Revert "sched: secure access to other CPU statistics"
This reverts commit 2aa14d0379cc54bc0ec44adb7a2e0ad02ae293d0.
The way this functionality is implemented is under review and the current implementation
is considered not safe.
Signed-of-by: Liviu Dudau <Liviu.Dudau@arm.com>
-rw-r--r-- | kernel/sched/fair.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 192d26e49c8..85eece483eb 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3160,28 +3160,13 @@ done: static inline bool is_buddy_busy(int cpu) { struct rq *rq = cpu_rq(cpu); - volatile u32 *psum = &rq->avg.runnable_avg_sum; - volatile u32 *pperiod = &rq->avg.runnable_avg_period; - u32 sum, new_sum, period, new_period; - int timeout = 10; - - while (timeout) { - sum = *psum; - period = *pperiod; - new_sum = *psum; - new_period = *pperiod; - - if ((sum == new_sum) && (period == new_period)) - break; - - timeout--; - } /* * A busy buddy is a CPU with a high load or a small load with a lot of * running tasks. */ - return ((new_sum << rq->nr_running) > new_period); + return ((rq->avg.usage_avg_sum << rq->nr_running) > + rq->avg.runnable_avg_period); } static inline bool is_light_task(struct task_struct *p) |