)]}'
{
  "commit": "f284b77333b1320491f138b76f11006bbc962569",
  "tree": "9d6626935b6b8fef7ebb9ecf8f30c2e84940b149",
  "parents": [
    "903c63033fff6a0f2f60b7c71831fe3b25ea9abc"
  ],
  "author": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Wed Jun 12 13:50:58 2013 -0700"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Wed Jun 12 13:50:58 2013 -0700"
  },
  "message": "cgroup: use percpu refcnt for cgroup_subsys_states\n\nA css (cgroup_subsys_state) is how each cgroup is represented to a\ncontroller.  As such, it can be used in hot paths across the various\nsubsystems different controllers are associated with.\n\nOne of the common operations is reference counting, which up until now\nhas been implemented using a global atomic counter and can have\nsignificant adverse impact on scalability.  For example, css refcnt\ncan be gotten and put multiple times by blkcg for each IO request.\nFor highops configurations which try to do as much per-cpu as\npossible, the global frequent refcnting can be very expensive.\n\nIn general, given the various hugely diverse paths css\u0027s end up being\nused from, we need to make it cheap and highly scalable.  In its\nusage, css refcnting isn\u0027t very different from module refcnting.\n\nThis patch converts css refcnting to use the recently added\npercpu_ref.  css_get/tryget/put() directly maps to the matching\npercpu_ref operations and the deactivation logic is no longer\nnecessary as percpu_ref already has refcnt killing.\n\nThe only complication is that as the refcnt is per-cpu,\npercpu_ref_kill() in itself doesn\u0027t ensure that further tryget\noperations will fail, which we need to guarantee before invoking\n-\u003ecss_offline()\u0027s.  This is resolved collecting kill confirmation\nusing percpu_ref_kill_and_confirm() and initiating the offline phase\nof destruction after all css refcnt\u0027s are confirmed to be seen as\nkilled on all CPUs.  The previous patches already splitted destruction\ninto two phases, so percpu_ref_kill_and_confirm() can be hooked up\neasily.\n\nThis patch removes css_refcnt() which is used for rcu dereference\nsanity check in css_id().  While we can add a percpu refcnt API to ask\nthe same question, css_id() itself is scheduled to be removed fairly\nsoon, so let\u0027s not bother with it.  Just drop the sanity check and use\nrcu_dereference_raw() instead.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Mike Snitzer \u003csnitzer@redhat.com\u003e\nCc: Vivek Goyal \u003cvgoyal@redhat.com\u003e\nCc: \"Alasdair G. Kergon\" \u003cagk@redhat.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: Mikulas Patocka \u003cmpatocka@redhat.com\u003e\nCc: Glauber Costa \u003cglommer@gmail.com\u003e\nCc: Kent Overstreet \u003ckoverstreet@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "58ee0f4dde57e0e8481198ad2783e494f623663d",
      "old_mode": 33188,
      "old_path": "include/linux/cgroup.h",
      "new_id": "4d71cc2f1ebfc3c50fd30d370b2af7b75f20df8e",
      "new_mode": 33188,
      "new_path": "include/linux/cgroup.h"
    },
    {
      "type": "modify",
      "old_id": "83e3183390703a45d73afb36e8ee4b2c55a59f02",
      "old_mode": 33188,
      "old_path": "kernel/cgroup.c",
      "new_id": "769f800addab425cbaacdc600a76b38e75edf42e",
      "new_mode": 33188,
      "new_path": "kernel/cgroup.c"
    }
  ]
}
