linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v2 cgroup/for-4.6] cgroup, perf_event: make perf_event work on v2 hierarchy
@ 2016-02-24 22:12 Tejun Heo
  2016-02-24 22:12 ` [PATCH 1/2] cgroup: implement cgroup_subsys->implicit_on_dfl Tejun Heo
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tejun Heo @ 2016-02-24 22:12 UTC (permalink / raw)
  To: lizefan, hannes, a.p.zijlstra, mingo, acme
  Cc: linux-kernel, cgroups, kernel-team

Hello,

Changes from v1[1] are

* cgroup prep patches are applied to cgroup/for-4.6.

* Implicit controller support is reimplemented on top of the modular
  control mask update[2] which makes it simpler and better behaved -
  perf_event can now be returned to v2 hierarchy anytime.

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 two patches.

 0001-cgroup-implement-cgroup_subsys-implicit_on_dfl.patch
 0002-cgroup-perf_event-make-perf_event-controller-work-on.patch

This patchset is on top of cgroup/for-4.6 and available in the
following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup2-perf_event

As the changes are heavily dependent on updates in cgroup core and
relatively well isolated on perf side, once acked, I think it'd be
best to route this through cgroup tree.

diffstat follows.

 Documentation/cgroup-v2.txt |   12 ++++++++++++
 include/linux/cgroup-defs.h |   13 +++++++++++++
 kernel/cgroup.c             |   38 +++++++++++++++++++++++++++++++-------
 kernel/events/core.c        |    6 ++++++
 tools/perf/util/cgroup.c    |   26 +++++++++++++++++++-------
 5 files changed, 81 insertions(+), 14 deletions(-)

Thanks.

--
tejun

[1] http://lkml.kernel.org/g/1452205790-21331-1-git-send-email-tj@kernel.org
[2] http://lkml.kernel.org/g/1456351368-786-1-git-send-email-tj@kernel.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-02-02 18:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-24 22:12 [PATCHSET v2 cgroup/for-4.6] cgroup, perf_event: make perf_event work on v2 hierarchy Tejun Heo
2016-02-24 22:12 ` [PATCH 1/2] cgroup: implement cgroup_subsys->implicit_on_dfl Tejun Heo
2016-03-08 15:59   ` Tejun Heo
2016-02-24 22:12 ` [PATCH 2/2] cgroup, perf_event: make perf_event controller work on cgroup2 hierarchy Tejun Heo
2016-03-08 10:11   ` Peter Zijlstra
2017-01-29 19:35   ` [PATCH REPOST " Tejun Heo
2017-01-30 14:05     ` Arnaldo Carvalho de Melo
2017-01-30 15:07       ` Tejun Heo
2017-02-02 18:47     ` Tejun Heo
2016-03-03 15:06 ` [PATCHSET v2 cgroup/for-4.6] cgroup, perf_event: make perf_event work on v2 hierarchy Tejun Heo
2016-03-08  1:44   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).