[tip:sched/core] sched: Add SD_PREFER_SIBLING for SMT level

From: tip-bot for Vincent Guittot
Date: Fri Mar 27 2015 - 07:43:32 EST


Commit-ID: caff37ef96eac7fe96a582d032f6958e834e9447
Gitweb: http://git.kernel.org/tip/caff37ef96eac7fe96a582d032f6958e834e9447
Author: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
AuthorDate: Fri, 27 Feb 2015 16:54:13 +0100
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Fri, 27 Mar 2015 09:36:05 +0100

sched: Add SD_PREFER_SIBLING for SMT level

Add the SD_PREFER_SIBLING flag for SMT level in order to ensure that
the scheduler will place at least one task per core.

Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Preeti U. Murthy <preeti@xxxxxxxxxxxxxxxxxx>
Cc: Morten.Rasmussen@xxxxxxx
Cc: dietmar.eggemann@xxxxxxx
Cc: efault@xxxxxx
Cc: kamalesh@xxxxxxxxxxxxxxxxxx
Cc: linaro-kernel@xxxxxxxxxxxxxxxx
Cc: nicolas.pitre@xxxxxxxxxx
Cc: riel@xxxxxxxxxx
Link: http://lkml.kernel.org/r/1425052454-25797-11-git-send-email-vincent.guittot@xxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 838fc9d..043e2a1 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6240,6 +6240,7 @@ sd_init(struct sched_domain_topology_level *tl, int cpu)
*/

if (sd->flags & SD_SHARE_CPUCAPACITY) {
+ sd->flags |= SD_PREFER_SIBLING;
sd->imbalance_pct = 110;
sd->smt_gain = 1178; /* ~15% */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/