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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 2 Jul 2021 10:08:09 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Sachin Sant <sachinp@...ux.vnet.ibm.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Odin Ugedal <odin@...d.al>
Subject: Re: [PATCH] sched/fair: Sync load_sum with load_avg after dequeue

On Fri, 2 Jul 2021 at 08:16, Sachin Sant <sachinp@...ux.vnet.ibm.com> wrote:
>
>
>
> > On 01-Jul-2021, at 10:48 PM, Vincent Guittot <vincent.guittot@...aro.org> wrote:
> >
> > commit 9e077b52d86a ("sched/pelt: Check that *_avg are null when *_sum are")
> > reported some inconsitencies between *_avg and *_sum.
> >
> > commit 1c35b07e6d39 ("sched/fair: Ensure _sum and _avg values stay consistent")
> > fixed some but one remains when dequeuing load.
> >
> > sync the cfs's load_sum with its load_avg after dequeuing the load of a
> > sched_entity.
> >
> > Fixes: 9e077b52d86a ("sched/pelt: Check that *_avg are null when *_sum are")
> > Reported-by: Sachin Sant <sachinp@...ux.vnet.ibm.com>
> > Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
> > ---
> >
> > I have been able to trigger a WARN on my system even with the patch
> > listed above. This patch fixes it.
> > Sachin could you test that it also fixes yours ?
> >
>
> I ran various LTP stress tests, scheduler tests and kernel compile operation for about 5 hours.
> Haven’t seen the warning during the testing.
>
> Tested-by: Sachin Sant <sachinp@...ux.vnet.ibm.com>

Thanks

>
> I have left the tests running, will let it run for few more hours.
>
> Thanks
> -Sachin
>
> > kernel/sched/fair.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 11d22943753f..48fc7dfc2f66 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -3037,8 +3037,9 @@ enqueue_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
> > static inline void
> > dequeue_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
> > {
> > +     u32 divider = get_pelt_divider(&se->avg);
> >       sub_positive(&cfs_rq->avg.load_avg, se->avg.load_avg);
> > -     sub_positive(&cfs_rq->avg.load_sum, se_weight(se) * se->avg.load_sum);
> > +     cfs_rq->avg.load_sum = cfs_rq->avg.load_avg * divider;
> > }
> > #else
> > static inline void
> > --
> > 2.17.1
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ