From: Peter Zijlstra <peterz@infradead.org>
To: jun qian <qianjun.kernel@gmail.com>
Cc: mingo@redhat.com, Vincent Guittot <vincent.guittot@linaro.org>,
juri.lelli@redhat.com, linux-kernel@vger.kernel.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de,
Yafang Shao <laoar.shao@gmail.com>
Subject: Re: [PATCH 1/1] sched/fair: Fix the wrong sched_stat_wait time
Date: Wed, 30 Sep 2020 11:57:19 +0200 [thread overview]
Message-ID: <20200930095719.GW2628@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKc596Jc6H5qFxrzSp_fGhqTZt-5ORLoP=E4bwG-QzkpRiL2bA@mail.gmail.com>
On Wed, Sep 30, 2020 at 05:16:29PM +0800, jun qian wrote:
> Peter Zijlstra <peterz@infradead.org> 于2020年9月30日周三 下午4:20写道:
> >
> > On Wed, Sep 30, 2020 at 10:47:12AM +0800, qianjun.kernel@gmail.com wrote:
> > > From: jun qian <qianjun.kernel@gmail.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 :-)
Thanks!
next prev parent reply other threads:[~2020-09-30 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 2:47 [PATCH 1/1] sched/fair: Fix the wrong sched_stat_wait time qianjun.kernel
2020-09-30 8:19 ` Peter Zijlstra
2020-09-30 9:16 ` jun qian
2020-09-30 9:57 ` Peter Zijlstra [this message]
2020-09-30 13:08 ` jun qian
2020-10-09 9:33 ` jun qian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200930095719.GW2628@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=qianjun.kernel@gmail.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox