lkml.org 
[lkml]   [2020]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] sched/fair: fix sgc->{min,max}_capacity miscalculate
On Sat, Jan 04, 2020 at 09:08:28PM +0800, Peng Liu wrote:
> commit bf475ce0a3dd ("sched/fair: Add per-CPU min capacity to
> sched_group_capacity") introduced per-cpu min_capacity.
>
> commit e3d6d0cb66f2 ("sched/fair: Add sched_group per-CPU max capacity")
> introduced per-cpu max_capacity.
>
> Here, capacity is the accumulated sum of (maybe) many CPUs' capacity.
> Compare with capacity to get {min,max}_capacity makes no sense. Instead,
> we should compare one by one in each iteration to get
> sgc->{min,max}_capacity of the group.
>
> Also, the only CPU in rq->sd->groups should be rq's CPU. Thus,
> capacity_of(cpu_of(rq)) should be equal to rq->sd->groups->sgc->capacity.
> Code can be simplified by removing the if/else.
>
> Signed-off-by: Peng Liu <iwtbavbm@gmail.com>
> Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
> ---
> v1: https://lkml.org/lkml/2019/12/30/502

Please (for future use); use the form:

https://lkml.kernel.org/r/$msgid

\
 
 \ /
  Last update: 2020-01-06 11:24    [W:0.050 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site