diff options
| -rw-r--r-- | kernel/sched/fair.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 59e072b2db97..756f9f9e8542 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -1265,7 +1265,6 @@ static void update_cfs_rq_blocked_load(struct cfs_rq *cfs_rq, int force_update) | |||
| 1265 | } | 1265 | } |
| 1266 | 1266 | ||
| 1267 | __update_cfs_rq_tg_load_contrib(cfs_rq, force_update); | 1267 | __update_cfs_rq_tg_load_contrib(cfs_rq, force_update); |
| 1268 | update_cfs_shares(cfs_rq); | ||
| 1269 | } | 1268 | } |
| 1270 | 1269 | ||
| 1271 | static inline void update_rq_runnable_avg(struct rq *rq, int runnable) | 1270 | static inline void update_rq_runnable_avg(struct rq *rq, int runnable) |
| @@ -1475,8 +1474,9 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) | |||
| 1475 | * Update run-time statistics of the 'current'. | 1474 | * Update run-time statistics of the 'current'. |
| 1476 | */ | 1475 | */ |
| 1477 | update_curr(cfs_rq); | 1476 | update_curr(cfs_rq); |
| 1478 | account_entity_enqueue(cfs_rq, se); | ||
| 1479 | enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP); | 1477 | enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP); |
| 1478 | account_entity_enqueue(cfs_rq, se); | ||
| 1479 | update_cfs_shares(cfs_rq); | ||
| 1480 | 1480 | ||
| 1481 | if (flags & ENQUEUE_WAKEUP) { | 1481 | if (flags & ENQUEUE_WAKEUP) { |
| 1482 | place_entity(cfs_rq, se, 0); | 1482 | place_entity(cfs_rq, se, 0); |
| @@ -1549,6 +1549,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) | |||
| 1549 | * Update run-time statistics of the 'current'. | 1549 | * Update run-time statistics of the 'current'. |
| 1550 | */ | 1550 | */ |
| 1551 | update_curr(cfs_rq); | 1551 | update_curr(cfs_rq); |
| 1552 | dequeue_entity_load_avg(cfs_rq, se, flags & DEQUEUE_SLEEP); | ||
| 1552 | 1553 | ||
| 1553 | update_stats_dequeue(cfs_rq, se); | 1554 | update_stats_dequeue(cfs_rq, se); |
| 1554 | if (flags & DEQUEUE_SLEEP) { | 1555 | if (flags & DEQUEUE_SLEEP) { |
| @@ -1568,8 +1569,8 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) | |||
| 1568 | 1569 | ||
| 1569 | if (se != cfs_rq->curr) | 1570 | if (se != cfs_rq->curr) |
| 1570 | __dequeue_entity(cfs_rq, se); | 1571 | __dequeue_entity(cfs_rq, se); |
| 1572 | se->on_rq = 0; | ||
| 1571 | account_entity_dequeue(cfs_rq, se); | 1573 | account_entity_dequeue(cfs_rq, se); |
| 1572 | dequeue_entity_load_avg(cfs_rq, se, flags & DEQUEUE_SLEEP); | ||
| 1573 | 1574 | ||
| 1574 | /* | 1575 | /* |
| 1575 | * Normalize the entity after updating the min_vruntime because the | 1576 | * Normalize the entity after updating the min_vruntime because the |
| @@ -1583,7 +1584,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) | |||
| 1583 | return_cfs_rq_runtime(cfs_rq); | 1584 | return_cfs_rq_runtime(cfs_rq); |
| 1584 | 1585 | ||
| 1585 | update_min_vruntime(cfs_rq); | 1586 | update_min_vruntime(cfs_rq); |
| 1586 | se->on_rq = 0; | 1587 | update_cfs_shares(cfs_rq); |
| 1587 | } | 1588 | } |
| 1588 | 1589 | ||
| 1589 | /* | 1590 | /* |
| @@ -2595,8 +2596,8 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags) | |||
| 2595 | if (cfs_rq_throttled(cfs_rq)) | 2596 | if (cfs_rq_throttled(cfs_rq)) |
| 2596 | break; | 2597 | break; |
| 2597 | 2598 | ||
| 2599 | update_cfs_shares(cfs_rq); | ||
| 2598 | update_entity_load_avg(se, 1); | 2600 | update_entity_load_avg(se, 1); |
| 2599 | update_cfs_rq_blocked_load(cfs_rq, 0); | ||
| 2600 | } | 2601 | } |
| 2601 | 2602 | ||
| 2602 | if (!se) { | 2603 | if (!se) { |
| @@ -2656,8 +2657,8 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags) | |||
| 2656 | if (cfs_rq_throttled(cfs_rq)) | 2657 | if (cfs_rq_throttled(cfs_rq)) |
| 2657 | break; | 2658 | break; |
| 2658 | 2659 | ||
| 2660 | update_cfs_shares(cfs_rq); | ||
| 2659 | update_entity_load_avg(se, 1); | 2661 | update_entity_load_avg(se, 1); |
| 2660 | update_cfs_rq_blocked_load(cfs_rq, 0); | ||
| 2661 | } | 2662 | } |
| 2662 | 2663 | ||
| 2663 | if (!se) { | 2664 | if (!se) { |
| @@ -5837,11 +5838,8 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares) | |||
| 5837 | se = tg->se[i]; | 5838 | se = tg->se[i]; |
| 5838 | /* Propagate contribution to hierarchy */ | 5839 | /* Propagate contribution to hierarchy */ |
| 5839 | raw_spin_lock_irqsave(&rq->lock, flags); | 5840 | raw_spin_lock_irqsave(&rq->lock, flags); |
| 5840 | for_each_sched_entity(se) { | 5841 | for_each_sched_entity(se) |
| 5841 | update_cfs_shares(group_cfs_rq(se)); | 5842 | update_cfs_shares(group_cfs_rq(se)); |
| 5842 | /* update contribution to parent */ | ||
| 5843 | update_entity_load_avg(se, 1); | ||
| 5844 | } | ||
| 5845 | raw_spin_unlock_irqrestore(&rq->lock, flags); | 5843 | raw_spin_unlock_irqrestore(&rq->lock, flags); |
| 5846 | } | 5844 | } |
| 5847 | 5845 | ||
