aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2012-11-16 18:32:38 +0000
committerViresh Kumar <viresh.kumar@linaro.org>2012-11-17 08:49:37 +0530
commit6b154e6d26d133bb9cbfc05205fd81ba2b114d64 (patch)
treec167270a998a1f2dfdbb7aabc982bc6654ef3a19
parent996af652cdbbf4f0496480acba8fa14818371bf8 (diff)
downloadvexpress-lsk-6b154e6d26d133bb9cbfc05205fd81ba2b114d64.tar.gz
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.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2ab0a09604a..5a93ae363d0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3155,28 +3155,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)