Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391363 > unrolled thread
| Started by | Dietmar Eggemann <dietmar.eggemann@arm.com> |
|---|---|
| First post | 2016-04-29 21:40 +0200 |
| Last post | 2016-04-29 21:40 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/7] sched/fair: fixes and cleanups Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-04-29 21:40 +0200
[PATCH 6/7] sched/fair: Reorder code in update_sd_lb_stats() Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-04-29 21:40 +0200
| From | Dietmar Eggemann <dietmar.eggemann@arm.com> |
|---|---|
| Date | 2016-04-29 21:40 +0200 |
| Subject | [PATCH 0/7] sched/fair: fixes and cleanups |
| Message-ID | <rtmqB-34w-5@gated-at.bofh.it> |
This is a collection of rather loosely coupled small changes to the cfs scheduler related to: Comments (patch 1/7, 2/7): Remove/fix some outdated comments related to 'power aware scheduling' and smpnice. Load-balance (patch 3/7 - 5/7): Change unit of load_above_capacity in calculate_imbalance() from [load] to [load/capacity] Refactoring logic in fix_small_imbalance() and remove cpu_avg_load_per_task(). Misc (patch 6/7, 7/7): Reorder update_sd_lb_stats() and use group_cfs_rq(se) throughout fair.c. Test-results: IVB-EP (2*10*2): perf stat --null --repeat 10 -- perf bench sched messaging -g 50 -l 5000 Before: After: 4.784556741 ( +- 0.99% ) 4.760953662 ( +- 0.47% ) Juno (ARM64) (2B/4l*1): perf stat --null --repeat 10 -- perf bench sched messaging -g 20 -l 500 Before: After: 7.227439638 ( +- 0.50% ) 7.151685712 ( +- 0.64% ) Dietmar Eggemann (5): sched/fair: Remove remaining power aware scheduling comments sched/fair: Fix comment in calculate_imbalance() sched/fair: Clean up the logic in fix_small_imbalance() sched/fair: Reorder code in update_sd_lb_stats() sched/fair: Use group_cfs_rq(se) instead of se->my_q Morten Rasmussen (2): sched/fair: Correct unit of load_above_capacity sched/fair: Remove cpu_avg_load_per_task() kernel/sched/fair.c | 71 ++++++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 45 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Dietmar Eggemann <dietmar.eggemann@arm.com> |
|---|---|
| Date | 2016-04-29 21:40 +0200 |
| Subject | [PATCH 6/7] sched/fair: Reorder code in update_sd_lb_stats() |
| Message-ID | <rtmqC-34w-31@gated-at.bofh.it> |
| In reply to | #1391363 |
Do the update of total load and total capacity of sched_domain statistics before detecting if it is the local group. This and the inclusion of sg=sg->next into the condition of the do...while loop makes the code easier to read. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> --- kernel/sched/fair.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e68b9eb5cb97..58da724b6ca4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6801,8 +6801,12 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd update_sg_lb_stats(env, sg, load_idx, local_group, sgs, &overload); + /* Update sd_lb_stats */ + sds->total_load += sgs->group_load; + sds->total_capacity += sgs->group_capacity; + if (local_group) - goto next_group; + continue; /* * In case the child domain prefers tasks go to siblings @@ -6826,13 +6830,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd sds->busiest_stat = *sgs; } -next_group: - /* Now, start updating sd_lb_stats */ - sds->total_load += sgs->group_load; - sds->total_capacity += sgs->group_capacity; - - sg = sg->next; - } while (sg != env->sd->groups); + } while (sg = sg->next, sg != env->sd->groups); if (env->sd->flags & SD_NUMA) env->fbq_type = fbq_classify_group(&sds->busiest_stat); -- 1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web