Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303954
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHSET] cgroup, perf_event: make perf_event work on v2 hierarchy |
| Date | 2016-01-07 23:40 +0100 |
| Message-ID | <qOrnQ-63O-21@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hello, perf_event is special in that while it primarily is there to identify cgroup membership of tasks, it also keeps some per-cgroup state, so unlike other controllers which are purely for identification, it can't be replaced by v2 hierarchy membership tests. At the same time, as it is primarily used for tagging, doesn't incur meaningful runtime overhead and doesn't have any interface, it's awkward to control it via the usual "cgroup.subtree_control" mechanism on the v2 hierarchy. This patchset makes perf_event implicitly enabled on the v2 hierarchy so that cgroup v2 path automatically works with "perf record --cgroup" as long as perf_event controller is available and not mounted on a legacy hierarchy. "perf record" is updated so that it searches for both v1 hierarchy w/ perf_event on it and v2 hierarchy. The v1 hierarchy is used if exists; otherwise, v2 is used, making the transition transparent to users. This patchset contains the following six patches. 0001-cgroup-s-cgrp_dfl_root_-cgrp_dfl_.patch 0002-cgroup-convert-cgroup_subsys-flag-fields-to-bool-bit.patch 0003-cgroup-make-css_tryget_online_from_dir-also-recogniz.patch 0004-cgroup-use-subtree_control-when-testing-no-internal-.patch 0005-cgroup-implement-cgroup_subsys-implicit_on_dfl.patch 0006-cgroup-perf_event-make-perf_event-controller-work-on.patch 0001-0004 are prep patches. 0005 implents implicit controller enabling. 0006 marks perf_event as implicitly enabled on v2 and updates "perf record" This patchset is on top of cgroup/for-4.5 and available in the following git branch. git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup2-perf_event diffstat follows. Thanks. Documentation/cgroup.txt | 13 ++++ include/linux/cgroup-defs.h | 21 ++++++- kernel/cgroup.c | 129 ++++++++++++++++++++++++++++++++++---------- kernel/cpuset.c | 2 kernel/events/core.c | 6 ++ kernel/sched/core.c | 2 kernel/sched/cpuacct.c | 2 tools/perf/util/cgroup.c | 26 ++++++-- 8 files changed, 160 insertions(+), 41 deletions(-) -- tejun
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCHSET] cgroup, perf_event: make perf_event work on v2 hierarchy Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 2/6] cgroup: convert cgroup_subsys flag fields to bool bitfields Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 1/6] cgroup: s/cgrp_dfl_root_/cgrp_dfl_/ Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 3/6] cgroup: make css_tryget_online_from_dir() also recognize cgroup2 fs Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 6/6] cgroup, perf_event: make perf_event controller work on cgroup2 hierarchy Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 4/6] cgroup: use ->subtree_control when testing no internal process rule Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100 [PATCH 5/6] cgroup: implement cgroup_subsys->implicit_on_dfl Tejun Heo <tj@kernel.org> - 2016-01-07 23:40 +0100
csiph-web