aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched_fair.c28
-rw-r--r--kernel/sched_features.h1
2 files changed, 28 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 496500988ce5..2268e634812b 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -430,6 +430,29 @@ calc_delta_asym(unsigned long delta, struct sched_entity *se)
430 for_each_sched_entity(se) { 430 for_each_sched_entity(se) {
431 struct load_weight *se_lw = &se->load; 431 struct load_weight *se_lw = &se->load;
432 432
433#ifdef CONFIG_FAIR_SCHED_GROUP
434 struct cfs_rq *cfs_rq = se->my_q;
435 struct task_group *tg = NULL
436
437 if (cfs_rq)
438 tg = cfs_rq->tg;
439
440 if (tg && tg->shares < NICE_0_LOAD) {
441 /*
442 * scale shares to what it would have been had
443 * tg->weight been NICE_0_LOAD:
444 *
445 * weight = 1024 * shares / tg->weight
446 */
447 lw.weight *= se->load.weight;
448 lw.weight /= tg->shares;
449
450 lw.inv_weight = 0;
451
452 se_lw = &lw;
453 } else
454#endif
455
433 if (se->load.weight < NICE_0_LOAD) 456 if (se->load.weight < NICE_0_LOAD)
434 se_lw = &lw; 457 se_lw = &lw;
435 458
@@ -1154,7 +1177,10 @@ static unsigned long wakeup_gran(struct sched_entity *se)
1154 * More easily preempt - nice tasks, while not making it harder for 1177 * More easily preempt - nice tasks, while not making it harder for
1155 * + nice tasks. 1178 * + nice tasks.
1156 */ 1179 */
1157 gran = calc_delta_asym(sysctl_sched_wakeup_granularity, se); 1180 if (sched_feat(ASYM_GRAN))
1181 gran = calc_delta_asym(sysctl_sched_wakeup_granularity, se);
1182 else
1183 gran = calc_delta_fair(sysctl_sched_wakeup_granularity, se);
1158 1184
1159 return gran; 1185 return gran;
1160} 1186}
diff --git a/kernel/sched_features.h b/kernel/sched_features.h
index afa549166d8d..04123af2e678 100644
--- a/kernel/sched_features.h
+++ b/kernel/sched_features.h
@@ -7,3 +7,4 @@ SCHED_FEAT(CACHE_HOT_BUDDY, 1)
7SCHED_FEAT(SYNC_WAKEUPS, 1) 7SCHED_FEAT(SYNC_WAKEUPS, 1)
8SCHED_FEAT(HRTICK, 1) 8SCHED_FEAT(HRTICK, 1)
9SCHED_FEAT(DOUBLE_TICK, 0) 9SCHED_FEAT(DOUBLE_TICK, 0)
10SCHED_FEAT(ASYM_GRAN, 1)