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 --- kernel/sched/fair.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 12f7d29..0ee9834 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3382,28 +3382,13 @@ static struct attribute_group hmp_attr_group = { 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)