)]}'
{
  "commit": "449dd6984d0e47643c04c807f609dd56d48d5bcc",
  "tree": "69f4a0a90290b048e63effc617c8ec907e8d6696",
  "parents": [
    "139e561660fe11e0fc35e142a800df3dd7d03e9d"
  ],
  "author": {
    "name": "Johannes Weiner",
    "email": "hannes@cmpxchg.org",
    "time": "Thu Apr 03 14:47:56 2014 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Thu Apr 03 16:21:01 2014 -0700"
  },
  "message": "mm: keep page cache radix tree nodes in check\n\nPreviously, page cache radix tree nodes were freed after reclaim emptied\nout their page pointers.  But now reclaim stores shadow entries in their\nplace, which are only reclaimed when the inodes themselves are\nreclaimed.  This is problematic for bigger files that are still in use\nafter they have a significant amount of their cache reclaimed, without\nany of those pages actually refaulting.  The shadow entries will just\nsit there and waste memory.  In the worst case, the shadow entries will\naccumulate until the machine runs out of memory.\n\nTo get this under control, the VM will track radix tree nodes\nexclusively containing shadow entries on a per-NUMA node list.  Per-NUMA\nrather than global because we expect the radix tree nodes themselves to\nbe allocated node-locally and we want to reduce cross-node references of\notherwise independent cache workloads.  A simple shrinker will then\nreclaim these nodes on memory pressure.\n\nA few things need to be stored in the radix tree node to implement the\nshadow node LRU and allow tree deletions coming from the list:\n\n1. There is no index available that would describe the reverse path\n   from the node up to the tree root, which is needed to perform a\n   deletion.  To solve this, encode in each node its offset inside the\n   parent.  This can be stored in the unused upper bits of the same\n   member that stores the node\u0027s height at no extra space cost.\n\n2. The number of shadow entries needs to be counted in addition to the\n   regular entries, to quickly detect when the node is ready to go to\n   the shadow node LRU list.  The current entry count is an unsigned\n   int but the maximum number of entries is 64, so a shadow counter\n   can easily be stored in the unused upper bits.\n\n3. Tree modification needs tree lock and tree root, which are located\n   in the address space, so store an address_space backpointer in the\n   node.  The parent pointer of the node is in a union with the 2-word\n   rcu_head, so the backpointer comes at no extra cost as well.\n\n4. The node needs to be linked to an LRU list, which requires a list\n   head inside the node.  This does increase the size of the node, but\n   it does not change the number of objects that fit into a slab page.\n\n[akpm@linux-foundation.org: export the right function]\nSigned-off-by: Johannes Weiner \u003channes@cmpxchg.org\u003e\nReviewed-by: Rik van Riel \u003criel@redhat.com\u003e\nReviewed-by: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Bob Liu \u003cbob.liu@oracle.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Greg Thelen \u003cgthelen@google.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Jan Kara \u003cjack@suse.cz\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nCc: Luigi Semenzato \u003csemenzato@google.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Metin Doslu \u003cmetin@citusdata.com\u003e\nCc: Michel Lespinasse \u003cwalken@google.com\u003e\nCc: Ozgun Erdogan \u003cozgun@citusdata.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Roman Gushchin \u003cklamm@yandex-team.ru\u003e\nCc: Ryan Mallon \u003crmallon@gmail.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Vlastimil Babka \u003cvbabka@suse.cz\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": "3ce541753c88bf02a4feead675ecaaa7b01f579b",
      "old_mode": 33188,
      "old_path": "include/linux/list_lru.h",
      "new_id": "f3434533fbf88e4a33dc00557fb361bf9d202726",
      "new_mode": 33188,
      "new_path": "include/linux/list_lru.h"
    },
    {
      "type": "modify",
      "old_id": "f25db1d74a216f3c2d0398ef692251b49b24bce8",
      "old_mode": 33188,
      "old_path": "include/linux/mmzone.h",
      "new_id": "fac5509c18f0f74cadb2ccb783ea9e65868d711a",
      "new_mode": 33188,
      "new_path": "include/linux/mmzone.h"
    },
    {
      "type": "modify",
      "old_id": "13636c40bc423bc899fb7e5d5ab5fe319414de14",
      "old_mode": 33188,
      "old_path": "include/linux/radix-tree.h",
      "new_id": "33170dbd9db40227f6d1f200193d83772ed9db28",
      "new_mode": 33188,
      "new_path": "include/linux/radix-tree.h"
    },
    {
      "type": "modify",
      "old_id": "b83cf61403eda8430d9a3bb545d6bab52531e235",
      "old_mode": 33188,
      "old_path": "include/linux/swap.h",
      "new_id": "350711560753e8a2b1cca463b51580827903c0ef",
      "new_mode": 33188,
      "new_path": "include/linux/swap.h"
    },
    {
      "type": "modify",
      "old_id": "d60be40c111b8f538b88dcc5a865da77f313a211",
      "old_mode": 33188,
      "old_path": "lib/radix-tree.c",
      "new_id": "9599aa72d7a024795b300750e55147a60f58ed19",
      "new_mode": 33188,
      "new_path": "lib/radix-tree.c"
    },
    {
      "type": "modify",
      "old_id": "a603c4d7d3c9c7ff2659bbdd273d20fbb5e90f6e",
      "old_mode": 33188,
      "old_path": "mm/filemap.c",
      "new_id": "d6df3bacb0fbe38bbacb6a81b3399391e4455ba3",
      "new_mode": 33188,
      "new_path": "mm/filemap.c"
    },
    {
      "type": "modify",
      "old_id": "72f9decb0104f046cef155532200cd91e15fea58",
      "old_mode": 33188,
      "old_path": "mm/list_lru.c",
      "new_id": "f1a0db1941735e1fdf3cfe4da7153573f0cad877",
      "new_mode": 33188,
      "new_path": "mm/list_lru.c"
    },
    {
      "type": "modify",
      "old_id": "0db9258319f0f63f484da118e80ecc6b76423349",
      "old_mode": 33188,
      "old_path": "mm/truncate.c",
      "new_id": "e5cc39ab0751f08b30691c3e7e8c98e32ded409c",
      "new_mode": 33188,
      "new_path": "mm/truncate.c"
    },
    {
      "type": "modify",
      "old_id": "843125a0e255ccb35127f804498aea71d9f26e52",
      "old_mode": 33188,
      "old_path": "mm/vmstat.c",
      "new_id": "f3155d51acfd391801d2558741686c8a3fbf5de9",
      "new_mode": 33188,
      "new_path": "mm/vmstat.c"
    },
    {
      "type": "modify",
      "old_id": "8a6c7cff4923f9e162df8023f9eda2695b8e3ca0",
      "old_mode": 33188,
      "old_path": "mm/workingset.c",
      "new_id": "f7216fa7da273b4ac4dd293f919dbcf08b7775f8",
      "new_mode": 33188,
      "new_path": "mm/workingset.c"
    }
  ]
}
