)]}'
{
  "commit": "13e75ef926431dcef8e7a3aab7b922528098c88e",
  "tree": "4c05edbf7bd348d5ccfff374843abab0cb8770e5",
  "parents": [
    "add4079cd70e412264c41c9c6c83fb47cdea39ed"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Tue May 13 12:57:14 2014 -0400"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Tue May 13 12:57:14 2014 -0400"
  },
  "message": "cgroup: use cgroup-\u003eself.refcnt for cgroup refcnting\n\nCurrently cgroup implements refcnting separately using atomic_t\ncgroup-\u003erefcnt.  The destruction paths of cgroup and css are rather\ncomplex and bear a lot of similiarities including the use of RCU and\nbouncing to a work item.\n\nThis patch makes cgroup use the refcnt of self css for refcnting\ninstead of using its own.  This makes cgroup refcnting use css\u0027s\npercpu refcnt and share the destruction mechanism.\n\n* css_release_work_fn() and css_free_work_fn() are updated to handle\n  both csses and cgroups.  This is a bit messy but should do until we\n  can make cgroup-\u003eself a full css, which currently can\u0027t be done\n  thanks to multiple hierarchies.\n\n* cgroup_destroy_locked() now performs\n  percpu_ref_kill(\u0026cgrp-\u003eself.refcnt) instead of cgroup_put(cgrp).\n\n* Negative refcnt sanity check in cgroup_get() is no longer necessary\n  as percpu_ref already handles it.\n\n* Similarly, as a cgroup which hasn\u0027t been killed will never be\n  released regardless of its refcnt value and percpu_ref has sanity\n  check on kill, cgroup_is_dead() sanity check in cgroup_put() is no\n  longer necessary.\n\n* As whether a refcnt reached zero or not can only be decided after\n  the reference count is killed, cgroup_root-\u003ecgrp\u0027s refcnting can no\n  longer be used to decide whether to kill the root or not.  Let\u0027s\n  make cgroup_kill_sb() explicitly initiate destruction if the root\n  doesn\u0027t have any children.  This makes sense anyway as unmounted\n  cgroup hierarchy without any children should be destroyed.\n\nWhile this is a bit messy, this will allow pushing more bookkeeping\ntowards cgroup-\u003eself and thus handling cgroups and csses in more\nuniform way.  In the very long term, it should be possible to\nintroduce a base subsystem and convert the self css to a proper one\nmaking things whole lot simpler and unified.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "286e39e4e9bf00db80c6a4136a70f40778b62dbb",
      "old_mode": 33188,
      "old_path": "include/linux/cgroup.h",
      "new_id": "76dadd77a12022ace8d26f5e91e2529d88d70258",
      "new_mode": 33188,
      "new_path": "include/linux/cgroup.h"
    },
    {
      "type": "modify",
      "old_id": "d1439ef886e0720f334c63c7f36e580aca749827",
      "old_mode": 33188,
      "old_path": "kernel/cgroup.c",
      "new_id": "365787ffb83155a987e7bfd70607502e42c3ee4c",
      "new_mode": 33188,
      "new_path": "kernel/cgroup.c"
    }
  ]
}
