)]}'
{
  "commit": "52cd3b074050dd664380b5e8cfc85d4a6ed8ad48",
  "tree": "fcfcf55c0e81376ea34919fab26e29bedd7f3b88",
  "parents": [
    "a6020ed759404372e8be2b276e85e51735472cc9"
  ],
  "author": {
    "name": "Lee Schermerhorn",
    "email": "lee.schermerhorn@hp.com",
    "time": "Mon Apr 28 02:13:16 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Apr 28 08:58:24 2008 -0700"
  },
  "message": "mempolicy: rework mempolicy Reference Counting [yet again]\n\nAfter further discussion with Christoph Lameter, it has become clear that my\nearlier attempts to clean up the mempolicy reference counting were a bit of\noverkill in some areas, resulting in superflous ref/unref in what are usually\nfast paths.  In other areas, further inspection reveals that I botched the\nunref for interleave policies.\n\nA separate patch, suitable for upstream/stable trees, fixes up the known\nerrors in the previous attempt to fix reference counting.\n\nThis patch reworks the memory policy referencing counting and, one hopes,\nsimplifies the code.  Maybe I\u0027ll get it right this time.\n\nSee the update to the numa_memory_policy.txt document for a discussion of\nmemory policy reference counting that motivates this patch.\n\nSummary:\n\nLookup of mempolicy, based on (vma, address) need only add a reference for\nshared policy, and we need only unref the policy when finished for shared\npolicies.  So, this patch backs out all of the unneeded extra reference\ncounting added by my previous attempt.  It then unrefs only shared policies\nwhen we\u0027re finished with them, using the mpol_cond_put() [conditional put]\nhelper function introduced by this patch.\n\nNote that shmem_swapin() calls read_swap_cache_async() with a dummy vma\ncontaining just the policy.  read_swap_cache_async() can call alloc_page_vma()\nmultiple times, so we can\u0027t let alloc_page_vma() unref the shared policy in\nthis case.  To avoid this, we make a copy of any non-null shared policy and\nremove the MPOL_F_SHARED flag from the copy.  This copy occurs before reading\na page [or multiple pages] from swap, so the overhead should not be an issue\nhere.\n\nI introduced a new static inline function \"mpol_cond_copy()\" to copy the\nshared policy to an on-stack policy and remove the flags that would require a\nconditional free.  The current implementation of mpol_cond_copy() assumes that\nthe struct mempolicy contains no pointers to dynamically allocated structures\nthat must be duplicated or reference counted during copy.\n\nSigned-off-by: Lee Schermerhorn \u003clee.schermerhorn@hp.com\u003e\nCc: Christoph Lameter \u003cclameter@sgi.com\u003e\nCc: David Rientjes \u003crientjes@google.com\u003e\nCc: Mel Gorman \u003cmel@csn.ul.ie\u003e\nCc: Andi Kleen \u003cak@suse.de\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": "27b9507a3769ac650f14f4837b1e20103a736bec",
      "old_mode": 33188,
      "old_path": "Documentation/vm/numa_memory_policy.txt",
      "new_id": "6719d642653f1ecaf83eae81ffab1ecc96a1fb6f",
      "new_mode": 33188,
      "new_path": "Documentation/vm/numa_memory_policy.txt"
    },
    {
      "type": "modify",
      "old_id": "017def89e568e0d74c6980462ec94cda3350f405",
      "old_mode": 33188,
      "old_path": "include/linux/mempolicy.h",
      "new_id": "172b9c6acb9165e6f8b3456e0100e9b8711855ae",
      "new_mode": 33188,
      "new_path": "include/linux/mempolicy.h"
    },
    {
      "type": "modify",
      "old_id": "8d1b2c468cc4077ea46ae7c508c9a9840e3bc662",
      "old_mode": 33188,
      "old_path": "ipc/shm.c",
      "new_id": "e636910454a9b80ab9216498b09002c86d93e088",
      "new_mode": 33188,
      "new_path": "ipc/shm.c"
    },
    {
      "type": "modify",
      "old_id": "53afa8c76ada95081fe0f4b27c375fe47ba32eea",
      "old_mode": 33188,
      "old_path": "mm/hugetlb.c",
      "new_id": "d36e1f11a5f267d441ffda665d4b6a6275c3d451",
      "new_mode": 33188,
      "new_path": "mm/hugetlb.c"
    },
    {
      "type": "modify",
      "old_id": "78b18a60b9b22aa44dc2e39504e1cf544080e0ee",
      "old_mode": 33188,
      "old_path": "mm/mempolicy.c",
      "new_id": "a237295f81901522146e83c7a6900a71c6acf29a",
      "new_mode": 33188,
      "new_path": "mm/mempolicy.c"
    },
    {
      "type": "modify",
      "old_id": "5326876d814d2ab01c86db08b8b6e50de3fd2f2b",
      "old_mode": 33188,
      "old_path": "mm/shmem.c",
      "new_id": "0b591c669b2de67527763e1f59c79d59021a1586",
      "new_mode": 33188,
      "new_path": "mm/shmem.c"
    }
  ]
}
