diff options
author | Mel Gorman <mgorman@suse.de> | 2014-08-06 14:19:21 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-08-06 21:17:45 +0200 |
commit | 372ba8cb46b271a7662b92cbefedee56725f6bd0 (patch) | |
tree | 536013552cd845b4eb0559dc79c023ecc426c21e /kernel/sched/core.c | |
parent | 64b4ca5cb6e1a9f577588db5765dc996ddf595e1 (diff) | |
download | linux-372ba8cb46b271a7662b92cbefedee56725f6bd0.tar.bz2 |
cpuidle: menu: Lookup CPU runqueues less
The menu governer makes separate lookups of the CPU runqueue to get
load and number of IO waiters but it can be done with a single lookup.
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 3bdf01b494fe..863ef1d19563 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2385,6 +2385,13 @@ unsigned long nr_iowait_cpu(int cpu) return atomic_read(&this->nr_iowait); } +void get_iowait_load(unsigned long *nr_waiters, unsigned long *load) +{ + struct rq *this = this_rq(); + *nr_waiters = atomic_read(&this->nr_iowait); + *load = this->cpu_load[0]; +} + #ifdef CONFIG_SMP /* |