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] [day] [month] [year] [list]
Date:	Tue, 28 Sep 2010 11:23:28 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	balbir@...ux.vnet.ibm.com, 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>
Subject: Re: [RFC PATCH 0/2] perf_events: add support for per-cpu per-cgroup
 monitoring (v3)

On Sat, Sep 25, 2010 at 11:51 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, 2010-09-22 at 12:26 +0200, Stephane Eranian wrote:
>
>> Ok, early testing shows that this seems to be working fine with the
>> pid approach. Of course it is less convenient than just opening a file
>> descriptor in cgroup_fs. There is more bookkeeping involved, incl.
>> cleanup the child on exit.
>
> Right, so another approach, similar to what you initially proposed,
> would be to have this cgroup file, but instead of simply opening and
> passing the fd around, have it provide a cgroup id and pass that around
> as an integer (or pid_t) in the task argument to the SYSCALL (see the
> flag bit below).
>
> You can use the regular lib/idr.c bits to generate ids and maintain an
> id->cgroup map.
>
What's the advantage of that compared to just passing the fd in the
pid argument?
You can close the fd right after returning from perf_event_open().

>> The other thing is related to how to indicate we want cgroup and not per-thread.
>> For now, my patch is using a new attr.cgroup bit. The alternative is to use a
>> bit in the flags parameter to the syscall.
>
> Right, I prefer a bit in the syscall flags argument and somehow using
> the task argument.
>
--
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