From: Peter Zijlstra <peterz@infradead.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Cong Wang <cwang@twopensource.com>
Subject: Re: [PATCH v2] sched: introduce sched_switch_post trace event
Date: Tue, 7 Jul 2015 08:45:58 +0200 [thread overview]
Message-ID: <20150707064558.GL3644@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1436210145-5520-1-git-send-email-xiyou.wangcong@gmail.com>
On Mon, Jul 06, 2015 at 12:15:45PM -0700, Cong Wang wrote:
> Currently we only have one sched_switch trace event
> for task switching, which is generated very early during
> task switch. When we try to monitor per-container perf
> events, this is not what we expect.
>
> For example, we have a process A which is in the cgroup
> we monitor, and process B which isn't, when kernel switches
> from B to A, the sched_switch event is not recorded for this
> cgroup since it belongs to B (current process is still B
> util we finish the switch), but we require this event to
> signal that process A in this cgroup gets scheduled. This is
> crucial for calculating schedule latency (like `perf sched`).
>
> Ideally, we need to split the sched_switch event into two:
> sched_in event before we perform the switch, and sched_out
> event after we perform the switch. However, for compatibility,
> we can not change the sched_switch event. So before we have
> trace event alias, we can just reuse sched_switch and introduce
> sched_switch_post event instead.
No.. its still horrible.
You're trying to solve perf problems with ftrace; this cannot work.
Does this patch by Adrian work for you? I think it solves this problem
and a bunch of others.
lkml.kernel.org/r/1435927962-32417-2-git-send-email-adrian.hunter@intel.com
next prev parent reply other threads:[~2015-07-07 6:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 19:15 Cong Wang
2015-07-07 0:15 ` Steven Rostedt
2015-07-08 20:42 ` Cong Wang
2015-07-07 6:45 ` Peter Zijlstra [this message]
2015-07-08 20:48 ` Cong Wang
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=20150707064558.GL3644@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=cwang@twopensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=xiyou.wangcong@gmail.com \
/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
Powered by JetHome