[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Apr 2013 10:00:53 +0800
From: Alex Shi <alex.shi@...el.com>
To: mingo@...hat.com, peterz@...radead.org, tglx@...utronix.de,
akpm@...ux-foundation.org, arjan@...ux.intel.com, bp@...en8.de,
pjt@...gle.com, namhyung@...nel.org, efault@....de,
morten.rasmussen@....com
Cc: vincent.guittot@...aro.org, gregkh@...uxfoundation.org,
preeti@...ux.vnet.ibm.com, viresh.kumar@...aro.org,
linux-kernel@...r.kernel.org, alex.shi@...el.com,
len.brown@...el.com, rafael.j.wysocki@...el.com, jkosina@...e.cz,
clark.williams@...il.com, tony.luck@...el.com,
keescook@...omium.org, mgorman@...e.de, riel@...hat.com
Subject: [patch v7 12/21] sched: using avg_idle to detect bursty wakeup
Sleeping task has no utiliation, when they were bursty waked up, the
zero utilization make scheduler out of balance, like aim7 benchmark.
rq->avg_idle is 'to used to accommodate bursty loads in a dirt simple
dirt cheap manner' -- Mike Galbraith.
With this cheap and smart bursty indicator, we can find the wake up
burst, and use nr_running as instant utilization in this scenario.
For other scenarios, we still use the precise CPU utilization to
judage if a domain is eligible for power scheduling.
Thanks for Mike Galbraith's idea!
Thanks for Namhyung's suggestion to compact the burst into
max_rq_util()!
Signed-off-by: Alex Shi <alex.shi@...el.com>
---
kernel/sched/fair.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f610313..a729939 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3363,6 +3363,10 @@ static unsigned int max_rq_util(int cpu)
unsigned int cfs_util;
unsigned int nr_running;
+ /* use nr_running as instant utilization for burst cpu */
+ if (cpu_rq(cpu)->avg_idle < sysctl_sched_burst_threshold)
+ return rq->nr_running * FULL_UTIL;
+
/* yield cfs utilization to rt's, if total utilization > 100% */
cfs_util = min(rq->util, (unsigned int)(FULL_UTIL - rt_util));
--
1.7.12
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists