[RFCv3,09/48] sched: add SD_PREFER_SIBLING for SMT level

Message ID 1423074685-6336-10-git-send-email-morten.rasmussen@arm.com
State New
Headers show

Commit Message

Morten Rasmussen Feb. 4, 2015, 6:30 p.m.
From: Vincent Guittot <vincent.guittot@linaro.org>

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

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Preeti U. Murthy <preeti@linux.vnet.ibm.com>
---
 kernel/sched/core.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 252011d..a00a4c3 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6236,6 +6236,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% */