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:	Wed, 8 Jul 2015 13:42:50 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Cong Wang <cwang@...pensource.com>
Subject: Re: [PATCH v2] sched: introduce sched_switch_post trace event

On Mon, Jul 6, 2015 at 5:15 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Mon,  6 Jul 2015 12:15:45 -0700
> Cong Wang <xiyou.wangcong@...il.com> 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`).
>
> I just want to understand this correctly. Does perf sched only listen
> to events that are executed by the task in a particular cgroup? There's
> no way to say "check sched_switch field next"?
>

perf_event cgroup needs to be specified in cmdline and `perf sched`
doesn't support that currently, I wrote my own tool to do this.
(I have some patch to add it to `perf sched`)

As I replied in the previous thread, we can certainly check if a process
belongs to a cgroup by tracking the PID's, but that is not easy.

>
> This looks identical to trace_sched_switch. Please convert both to a
> DECLARE_EVENT_CLASS() and DEFINE_EVENT()s.
>

Not identical, I rename 'next' to 'curr' since switch is done 'next'
becomes meaningless.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ