)]}'
{
  "commit": "8de7ecc6483bf94cef9f48c4c3511ef3e9ee6d40",
  "tree": "716ad73fe3a777589d6ee67aaafc16cd2f00aa21",
  "parents": [
    "1c4c3b99c03d3e72ac643b01edcb83c0c0aafd46"
  ],
  "author": {
    "name": "Shakeel Butt",
    "email": "shakeelb@google.com",
    "time": "Tue Aug 21 21:53:17 2018 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Aug 22 10:52:44 2018 -0700"
  },
  "message": "memcg: reduce memcg tree traversals for stats collection\n\nCurrently cgroup-v1\u0027s memcg_stat_show traverses the memcg tree ~17 times\nto collect the stats while cgroup-v2\u0027s memory_stat_show traverses the\nmemcg tree thrice.  On a large machine, a couple thousand memcgs is very\nnormal and if the churn is high and memcgs stick around during to several\nreasons, tens of thousands of nodes in memcg tree can exist.  This patch\nhas refactored and shared the stat collection code between cgroup-v1 and\ncgroup-v2 and has reduced the tree traversal to just one.\n\nI ran a simple benchmark which reads the root_mem_cgroup\u0027s stat file\n1000 times in the presense of 2500 memcgs on cgroup-v1. The results are:\n\nWithout the patch:\n$ time ./read-root-stat-1000-times\n\nreal    0m1.663s\nuser    0m0.000s\nsys     0m1.660s\n\nWith the patch:\n$ time ./read-root-stat-1000-times\n\nreal    0m0.468s\nuser    0m0.000s\nsys     0m0.467s\n\nLink: http://lkml.kernel.org/r/20180724224635.143944-1-shakeelb@google.com\nSigned-off-by: Shakeel Butt \u003cshakeelb@google.com\u003e\nAcked-by: Michal Hocko \u003cmhocko@suse.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Vladimir Davydov \u003cvdavydov.dev@gmail.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Bruce Merry \u003cbmerry@ska.ac.za\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6a921890739f7e1c0acad44d5916c5f43487a2a1",
      "old_mode": 33188,
      "old_path": "mm/memcontrol.c",
      "new_id": "59c14c988143b2ce6cfe4b90fc6bf6c2ff564be5",
      "new_mode": 33188,
      "new_path": "mm/memcontrol.c"
    }
  ]
}
