From: Alex Shi <alex.shi@linaro.org>
To: mingo@redhat.com, peterz@infradead.org, morten.rasmussen@arm.com
Cc: vincent.guittot@linaro.org, daniel.lezcano@linaro.org,
fweisbec@gmail.com, linux@arm.linux.org.uk, tony.luck@intel.com,
fenghua.yu@intel.com, james.hogan@imgtec.com,
alex.shi@linaro.org, jason.low2@hp.com, viresh.kumar@linaro.org,
hanjun.guo@linaro.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, akpm@linux-foundation.org,
arjan@linux.intel.com, pjt@google.com, fengguang.wu@intel.com,
linaro-kernel@lists.linaro.org, wangyun@linux.vnet.ibm.com,
mgorman@suse.de
Subject: [PATCH 1/8] sched: shortcut to remove load_idx
Date: Thu, 13 Mar 2014 13:57:22 +0800 [thread overview]
Message-ID: <1394690249-14130-2-git-send-email-alex.shi@linaro.org> (raw)
In-Reply-To: <1394690249-14130-1-git-send-email-alex.shi@linaro.org>
Shortcut to remove rq->cpu_load[load_idx] effect in scheduler.
In five load idx, only busy_idx, idle_idx are not zero.
Newidle_idx, wake_idx and fork_idx are all zero in all archs.
So, change the idx to zero here can fully remove load_idx effect.
Signed-off-by: Alex Shi <alex.shi@linaro.org>
---
kernel/sched/fair.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7e9bd0b..1d8a908 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5506,34 +5506,6 @@ static inline void init_sd_lb_stats(struct sd_lb_stats *sds)
};
}
-/**
- * get_sd_load_idx - Obtain the load index for a given sched domain.
- * @sd: The sched_domain whose load_idx is to be obtained.
- * @idle: The idle status of the CPU for whose sd load_idx is obtained.
- *
- * Return: The load index.
- */
-static inline int get_sd_load_idx(struct sched_domain *sd,
- enum cpu_idle_type idle)
-{
- int load_idx;
-
- switch (idle) {
- case CPU_NOT_IDLE:
- load_idx = sd->busy_idx;
- break;
-
- case CPU_NEWLY_IDLE:
- load_idx = sd->newidle_idx;
- break;
- default:
- load_idx = sd->idle_idx;
- break;
- }
-
- return load_idx;
-}
-
static unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu)
{
return SCHED_POWER_SCALE;
@@ -5919,7 +5891,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
if (child && child->flags & SD_PREFER_SIBLING)
prefer_sibling = 1;
- load_idx = get_sd_load_idx(env->sd, env->idle);
+ load_idx = 0;
do {
struct sg_lb_stats *sgs = &tmp_sgs;
--
1.8.1.2
next prev parent reply other threads:[~2014-03-13 6:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 5:57 [ PATCH 0/8] sched: remove cpu_load array Alex Shi
2014-03-13 5:57 ` Alex Shi [this message]
2014-03-13 5:57 ` [PATCH 2/8] sched: remove rq->cpu_load[load_idx] array Alex Shi
2014-03-13 5:57 ` [PATCH 3/8] sched: remove source_load and target_load Alex Shi
2014-03-13 5:57 ` [PATCH 4/8] sched: remove LB_BIAS Alex Shi
2014-03-13 5:57 ` [PATCH 5/8] sched: clean up cpu_load update Alex Shi
2014-03-13 5:57 ` [PATCH 6/8] sched: rewrite update_cpu_load_nohz Alex Shi
2014-03-13 5:57 ` [PATCH 7/8] sched: remove rq->cpu_load and rq->nr_load_updates Alex Shi
2014-03-13 5:57 ` [PATCH 8/8] sched: rename update_*_cpu_load Alex Shi
2014-03-17 3:24 ` [ PATCH 0/8] sched: remove cpu_load array Alex Shi
2014-03-18 2:17 ` Alex Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394690249-14130-2-git-send-email-alex.shi@linaro.org \
--to=alex.shi@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=fengguang.wu@intel.com \
--cc=fenghua.yu@intel.com \
--cc=fweisbec@gmail.com \
--cc=hanjun.guo@linaro.org \
--cc=james.hogan@imgtec.com \
--cc=jason.low2@hp.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=wangyun@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®