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] [day] [month] [year] [list]
Date:   Fri, 9 Oct 2020 17:33:14 +0800
From:   jun qian <qianjun.kernel@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     mingo@...hat.com, Vincent Guittot <vincent.guittot@...aro.org>,
        juri.lelli@...hat.com, linux-kernel@...r.kernel.org,
        dietmar.eggemann@....com, rostedt@...dmis.org,
        Benjamin Segall <bsegall@...gle.com>, mgorman@...e.de,
        Yafang Shao <laoar.shao@...il.com>
Subject: Re: [PATCH 1/1] sched/fair: Fix the wrong sched_stat_wait time

jun qian <qianjun.kernel@...il.com> 于2020年9月30日周三 下午9:08写道:
>
> Peter Zijlstra <peterz@...radead.org> 于2020年9月30日周三 下午5:57写道:
> >
> > On Wed, Sep 30, 2020 at 05:16:29PM +0800, jun qian wrote:
> > > Peter Zijlstra <peterz@...radead.org> 于2020年9月30日周三 下午4:20写道:
> > > >
> > > > On Wed, Sep 30, 2020 at 10:47:12AM +0800, qianjun.kernel@...il.com wrote:
> > > > > From: jun qian <qianjun.kernel@...il.com>
> > > > >
> > > > > When the sched_schedstat changes from 0 to 1, some sched se maybe
> > > > > already in the runqueue, the se->statistics.wait_start will be 0.
> > > > > So it will let the (rq_of(cfs_rq)) - se->statistics.wait_start)
> > > > > wrong. We need to avoid this scenario.
> > > >
> > > > Is this really the only problem there? Did you do a full audit of that
> > > > schedstat nonsense?
> > > >
> > >
> > > Did you mean that the sched_stat_xxx's xxx_start(sched_stat_sleep
> > > sched_stat_iowait sched_stat_blocked
> > > sched_stat_runtime) may be also depend the schedstat_enabled?
> >
> > Yeah, this runtime schedstat_enabled thing is fairly recent, it used to
> > be an always on/off kinda thing.
> >
> > At the time we figured inconsistencies from dynamically
> > enabling/disabling it were okay, it's just stats after all.
> >
> > But if you now want to 'fix' that, then a full audit might be nice.
> >
> > > I have searched the codes, and found that these sched_stat_xxx's
> > > xxx_start don't depend the schedstat_enabled
> > > except the wait_start.
> >
> > OK, so you did the audit and only found this one issue? That's good
> > Changelog material :-)
> >
>
> I found another problem, when the sched_schedstat changes from 1 to 0,
> the sched se
> which is already in the runqueue, the statistics.wait_start already
> has a value. At this moment
> sched_schedstat changes from 0 to 1 again, the (rq_of(cfs_rq)) -
> se->statistics.wait_start)
> will not be 0 and the wait time will be bigger than the real one. So
> we need to modify the  patch
> to resolve the problem with this scenario.
>

hi Peter

I have sent another patch to  improve the accuracy of sched_stat_wait
statistics.
I have no good idea to solve the another problem what i described up,
but the new
patch can  improve the accuracy.

Thanks

> So I really need a full audit might, :-)
>
> Thanks
>
> > Thanks!

Powered by blists - more mailing lists