From: peterz@infradead.org
To: gengdongjiu <gengdongjiu@huawei.com>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"bsegall@google.com" <bsegall@google.com>,
"mgorman@suse.de" <mgorman@suse.de>,
"thara.gopinath@linaro.org" <thara.gopinath@linaro.org>,
"pauld@redhat.com" <pauld@redhat.com>,
"vincent.donnefort@arm.com" <vincent.donnefort@arm.com>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: RE:[PATCH] sched: Add trace for task wake up latency and leave running time
Date: Thu, 3 Sep 2020 09:42:32 +0200 [thread overview]
Message-ID: <20200903074232.GW1362448@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <6995260be2ca4fd18bc773fe9f50f420@huawei.com>
On Wed, Sep 02, 2020 at 10:35:34PM +0000, gengdongjiu wrote:
> > NAK, that tracepoint is already broken, we don't want to proliferate the broken.
>
> Sorry, What the meaning that tracepoint is already broken?
Just that, the tracepoint is crap. But we can't fix it because ABI. Did
I tell you I utterly hate tracepoints?
> Maybe I need to explain the reason that why I add two trace point.
> when using perf tool or Ftrace sysfs to capture the task wake-up latency and the task leaving running queue time, usually the trace data is too large and the CPU utilization rate is too high in the process due to a lot of disk write. Sometimes even the disk is full, the issue still does not reproduced that above two time exceed a certain threshold. So I added two trace points, using filter we can only record the abnormal trace that includes wakeup latency and leaving running time larger than an threshold.
> Or do you have better solution?
Learn to use a MUA and wrap your lines at 78 chars like normal people.
Yes, use ftrace synthetic events, or bpf or really anything other than
this.
> > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c index
> > > 8471a0f7eb32..b5a1928dc948 100644
> > > --- a/kernel/sched/core.c
> > > +++ b/kernel/sched/core.c
> > > @@ -2464,6 +2464,8 @@ static void ttwu_do_wakeup(struct rq *rq, struct
> > > task_struct *p, int wake_flags, {
> > > check_preempt_curr(rq, p, wake_flags);
> > > p->state = TASK_RUNNING;
> > > + p->ts_wakeup = local_clock();
> > > + p->wakeup_state = true;
> > > trace_sched_wakeup(p);
> > >
> > > #ifdef CONFIG_SMP
> >
> > NAK, userless overhead.
>
> When sched switch, we do not know the next task previous state and
> wakeup timestamp, so I record the task previous state if it is waken
> from sleep. And then it can calculate the wakeup latency when task
> switch.
I don't care. You're making things slower.
next prev parent reply other threads:[~2020-09-03 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 22:35 gengdongjiu
2020-09-03 7:42 ` peterz [this message]
2020-09-03 8:49 ` RE???[PATCH] " Mel Gorman
2020-09-15 22:41 ` Steven Rostedt
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=20200903074232.GW1362448@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=gengdongjiu@huawei.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=thara.gopinath@linaro.org \
--cc=vincent.donnefort@arm.com \
--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
all inboxes | Powered by JetHome®