From: tip-bot for Vincent Guittot <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, vincent.guittot@linaro.org,
tglx@linutronix.de
Subject: [tip:sched/core] sched/fair: Move load idx selection in find_idlest_group
Date: Wed, 27 Nov 2013 06:10:39 -0800 [thread overview]
Message-ID: <tip-c44f2a020072d75d6b0cbf9f139a09719cda9367@git.kernel.org> (raw)
In-Reply-To: <1382097147-30088-8-git-send-email-vincent.guittot@linaro.org>
Commit-ID: c44f2a020072d75d6b0cbf9f139a09719cda9367
Gitweb: http://git.kernel.org/tip/c44f2a020072d75d6b0cbf9f139a09719cda9367
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Fri, 18 Oct 2013 13:52:21 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 27 Nov 2013 13:50:54 +0100
sched/fair: Move load idx selection in find_idlest_group
load_idx is used in find_idlest_group but initialized in select_task_rq_fair
even when not used. The load_idx initialisation is moved in find_idlest_group
and the sd_flag replaces it in the function's args.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Cc: len.brown@intel.com
Cc: amit.kucheria@linaro.org
Cc: pjt@google.com
Cc: l.majewski@samsung.com
Cc: Morten.Rasmussen@arm.com
Cc: cmetcalf@tilera.com
Cc: tony.luck@intel.com
Cc: alex.shi@intel.com
Cc: preeti@linux.vnet.ibm.com
Cc: linaro-kernel@lists.linaro.org
Cc: rjw@sisk.pl
Cc: paulmck@linux.vnet.ibm.com
Cc: corbet@lwn.net
Cc: arjan@linux.intel.com
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1382097147-30088-8-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/fair.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e8b652e..6cb36c7 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4110,12 +4110,16 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
*/
static struct sched_group *
find_idlest_group(struct sched_domain *sd, struct task_struct *p,
- int this_cpu, int load_idx)
+ int this_cpu, int sd_flag)
{
struct sched_group *idlest = NULL, *group = sd->groups;
unsigned long min_load = ULONG_MAX, this_load = 0;
+ int load_idx = sd->forkexec_idx;
int imbalance = 100 + (sd->imbalance_pct-100)/2;
+ if (sd_flag & SD_BALANCE_WAKE)
+ load_idx = sd->wake_idx;
+
do {
unsigned long load, avg_load;
int local_group;
@@ -4283,7 +4287,6 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
}
while (sd) {
- int load_idx = sd->forkexec_idx;
struct sched_group *group;
int weight;
@@ -4292,10 +4295,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
continue;
}
- if (sd_flag & SD_BALANCE_WAKE)
- load_idx = sd->wake_idx;
-
- group = find_idlest_group(sd, p, cpu, load_idx);
+ group = find_idlest_group(sd, p, cpu, sd_flag);
if (!group) {
sd = sd->child;
continue;
next prev parent reply other threads:[~2013-11-27 14:11 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 11:52 [RFC][PATCH v5 00/14] sched: packing tasks Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 01/14] sched: add a new arch_sd_local_flags for sched_domain init Vincent Guittot
2013-11-05 14:06 ` Peter Zijlstra
2013-11-05 14:57 ` Vincent Guittot
2013-11-05 22:27 ` Peter Zijlstra
2013-11-06 10:10 ` Vincent Guittot
2013-11-06 13:53 ` Martin Schwidefsky
2013-11-06 14:08 ` Peter Zijlstra
2013-11-12 17:43 ` Dietmar Eggemann
2013-11-12 18:08 ` Peter Zijlstra
2013-11-13 15:47 ` Dietmar Eggemann
2013-11-13 16:29 ` Peter Zijlstra
2013-11-14 10:49 ` Morten Rasmussen
2013-11-14 12:07 ` Peter Zijlstra
2013-12-18 13:13 ` [RFC] sched: CPU topology try Vincent Guittot
2013-12-23 17:22 ` Dietmar Eggemann
2014-01-06 13:41 ` Vincent Guittot
2014-01-06 16:31 ` Peter Zijlstra
2014-01-07 8:32 ` Vincent Guittot
2014-01-07 13:22 ` Peter Zijlstra
2014-01-07 14:10 ` Peter Zijlstra
2014-01-07 15:41 ` Morten Rasmussen
2014-01-07 20:49 ` Peter Zijlstra
2014-01-08 8:32 ` Alex Shi
2014-01-08 8:37 ` Peter Zijlstra
2014-01-08 12:52 ` Morten Rasmussen
2014-01-08 13:04 ` Peter Zijlstra
2014-01-08 13:33 ` Morten Rasmussen
2014-01-08 12:35 ` Morten Rasmussen
2014-01-08 12:42 ` Peter Zijlstra
2014-01-08 12:45 ` Peter Zijlstra
2014-01-08 13:27 ` Morten Rasmussen
2014-01-08 13:32 ` Peter Zijlstra
2014-01-08 13:45 ` Morten Rasmussen
2014-01-07 14:11 ` Vincent Guittot
2014-01-07 15:37 ` Morten Rasmussen
2014-01-08 8:37 ` Alex Shi
2014-01-06 16:28 ` Peter Zijlstra
2014-01-06 17:15 ` Morten Rasmussen
2014-01-07 9:57 ` Peter Zijlstra
2014-01-01 5:00 ` Preeti U Murthy
2014-01-06 16:33 ` Peter Zijlstra
2014-01-06 16:37 ` Arjan van de Ven
2014-01-06 16:48 ` Peter Zijlstra
2014-01-06 16:54 ` Peter Zijlstra
2014-01-06 17:13 ` Arjan van de Ven
2014-01-07 12:40 ` Vincent Guittot
2014-01-06 16:21 ` Peter Zijlstra
2014-01-07 8:22 ` Vincent Guittot
2014-01-07 9:40 ` Preeti U Murthy
2014-01-07 9:50 ` Peter Zijlstra
2014-01-07 10:39 ` Preeti U Murthy
2014-01-07 11:13 ` Peter Zijlstra
2014-01-07 16:31 ` Preeti U Murthy
2014-01-07 11:20 ` Morten Rasmussen
2014-01-07 12:31 ` Vincent Guittot
2014-01-07 16:51 ` Preeti U Murthy
2013-10-18 11:52 ` [RFC][PATCH v5 03/14] sched: define pack buddy CPUs Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 04/14] sched: do load balance only with packing cpus Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 05/14] sched: add a packing level knob Vincent Guittot
2013-11-12 10:32 ` Peter Zijlstra
2013-11-12 10:44 ` Vincent Guittot
2013-11-12 10:55 ` Peter Zijlstra
2013-11-12 10:57 ` Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 06/14] sched: create a new field with available capacity Vincent Guittot
2013-11-12 10:34 ` Peter Zijlstra
2013-11-12 11:05 ` Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 07/14] sched: get CPU's activity statistic Vincent Guittot
2013-11-12 10:36 ` Peter Zijlstra
2013-11-12 10:41 ` Peter Zijlstra
2013-10-18 11:52 ` [RFC][PATCH v5 08/14] sched: move load idx selection in find_idlest_group Vincent Guittot
2013-11-12 10:49 ` Peter Zijlstra
2013-11-27 14:10 ` tip-bot for Vincent Guittot [this message]
2013-10-18 11:52 ` [RFC][PATCH v5 09/14] sched: update the packing cpu list Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 10/14] sched: init this_load to max in find_idlest_group Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 11/14] sched: add a SCHED_PACKING_TASKS config Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 12/14] sched: create a statistic structure Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 13/14] sched: differantiate idle cpu Vincent Guittot
2013-10-18 11:52 ` [RFC][PATCH v5 14/14] cpuidle: set the current wake up latency Vincent Guittot
2013-11-11 11:33 ` [RFC][PATCH v5 00/14] sched: packing tasks Catalin Marinas
2013-11-11 16:36 ` Peter Zijlstra
2013-11-11 16:39 ` Arjan van de Ven
2013-11-11 18:18 ` Catalin Marinas
2013-11-11 18:20 ` Arjan van de Ven
2013-11-12 12:06 ` Morten Rasmussen
2013-11-12 16:48 ` Arjan van de Ven
2013-11-12 23:14 ` Catalin Marinas
2013-11-13 16:13 ` Arjan van de Ven
2013-11-13 16:45 ` Catalin Marinas
2013-11-13 17:56 ` Arjan van de Ven
2013-11-12 17:40 ` Catalin Marinas
2013-11-25 18:55 ` Daniel Lezcano
2013-11-11 16:38 ` Peter Zijlstra
2013-11-11 16:40 ` Arjan van de Ven
2013-11-12 10:36 ` Vincent Guittot
2013-11-11 16:54 ` Morten Rasmussen
2013-11-11 18:31 ` Catalin Marinas
2013-11-11 19:26 ` Arjan van de Ven
2013-11-11 22:43 ` Nicolas Pitre
2013-11-11 23:43 ` Catalin Marinas
2013-11-12 12:35 ` Vincent Guittot
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=tip-c44f2a020072d75d6b0cbf9f139a09719cda9367@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).