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:	Tue, 21 Sep 2010 15:38:56 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
	davem@...emloft.net, fweisbec@...il.com,
	perfmon2-devel@...ts.sf.net, eranian@...il.com,
	robert.richter@....com, acme@...hat.com,
	Paul Menage <menage@...gle.com>,
	Li Zefan <lizf@...fujitsu.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH 0/2] perf_events: add support for per-cpu per-cgroup
 monitoring (v3)

On Tue, Sep 21, 2010 at 2:42 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, 2010-09-21 at 13:48 +0200, Stephane Eranian wrote:
>> The main issue I see with this is that it relies on having at least one
>> task in the cgroup when you start the measurement. That is certainly
>> not always the case.
>
> Hmm, indeed. One thing we can do about that is move perf into the
> cgroup, create the counter (disabled) using self to identify the cgroup,
> move perf back to where it came from, and enable the counter.
>
Yes, that's another possibility. I wonder if there are any non-obvious
difficulties with this approach. Is it as simple as:
   FILE *fp;
   fp = fopen("/dev/cgroup/test/tasks", "w");
   fprintf(fp, "%d", gettid());
   close(fp):

> Its just that I prefer to keep the attach state in the syscall arguments
> and not the perf_event_attr struct.
>
I understand that.

> cgroups are task objects, so it makes sense to use the task attach to
> indicate the cgroup. The empty cgroup case is indeed a tad unfortunate.
> Not having to open more files and pass fds around was also a nice
> benefit.
>
Sure.
--
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