lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200106145227.GB15532@iZj6chx1xj0e0buvshuecpZ>
Date:   Mon, 6 Jan 2020 22:52:27 +0800
From:   Peng Liu <iwtbavbm@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        dietmar.eggemann@....com, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, rostedt@...dmis.org,
        bsegall@...gle.com, mgorman@...e.de, qais.yousef@....com,
        morten.rasmussen@....com, valentin.schneider@....com
Subject: Re: [PATCH v2] sched/fair: fix sgc->{min,max}_capacity miscalculate

On Mon, Jan 06, 2020 at 11:23:41AM +0100, Peter Zijlstra wrote:
> 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@...il.com>
> > Reviewed-by: Valentin Schneider <valentin.schneider@....com>
> > ---
> > v1: https://lkml.org/lkml/2019/12/30/502
> 
> Please (for future use); use the form:
> 
>   https://lkml.kernel.org/r/$msgid

Peter, thanks, I will.

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ