lkml.org 
[lkml]   [2016]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCHSET v2 cgroup/for-4.6] cgroup, perf_event: make perf_event work on v2 hierarchy
    Date
    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

    \
     
     \ /
      Last update: 2016-02-25 00:01    [W:4.499 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site