)]}'
{
  "commit": "4b3ef9daa4fc0bba742a79faecb17fdaaead083b",
  "tree": "52a387923455792179754189a685ba9c01f4b160",
  "parents": [
    "235b62176712b970c815923e36b9a9cc05d4d901"
  ],
  "author": {
    "name": "Huang, Ying",
    "email": "ying.huang@intel.com",
    "time": "Wed Feb 22 15:45:26 2017 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Feb 22 16:41:30 2017 -0800"
  },
  "message": "mm/swap: split swap cache into 64MB trunks\n\nThe patch is to improve the scalability of the swap out/in via using\nfine grained locks for the swap cache.  In current kernel, one address\nspace will be used for each swap device.  And in the common\nconfiguration, the number of the swap device is very small (one is\ntypical).  This causes the heavy lock contention on the radix tree of\nthe address space if multiple tasks swap out/in concurrently.\n\nBut in fact, there is no dependency between pages in the swap cache.  So\nthat, we can split the one shared address space for each swap device\ninto several address spaces to reduce the lock contention.  In the\npatch, the shared address space is split into 64MB trunks.  64MB is\nchosen to balance the memory space usage and effect of lock contention\nreduction.\n\nThe size of struct address_space on x86_64 architecture is 408B, so with\nthe patch, 6528B more memory will be used for every 1GB swap space on\nx86_64 architecture.\n\nOne address space is still shared for the swap entries in the same 64M\ntrunks.  To avoid lock contention for the first round of swap space\nallocation, the order of the swap clusters in the initial free clusters\nlist is changed.  The swap space distance between the consecutive swap\nclusters in the free cluster list is at least 64M.  After the first\nround of allocation, the swap clusters are expected to be freed\nrandomly, so the lock contention should be reduced effectively.\n\nLink: http://lkml.kernel.org/r/735bab895e64c930581ffb0a05b661e01da82bc5.1484082593.git.tim.c.chen@linux.intel.com\nSigned-off-by: \"Huang, Ying\" \u003cying.huang@intel.com\u003e\nSigned-off-by: Tim Chen \u003ctim.c.chen@linux.intel.com\u003e\nCc: Aaron Lu \u003caaron.lu@intel.com\u003e\nCc: Andi Kleen \u003cak@linux.intel.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Christian Borntraeger \u003cborntraeger@de.ibm.com\u003e\nCc: Dave Hansen \u003cdave.hansen@intel.com\u003e\nCc: Hillf Danton \u003chillf.zj@alibaba-inc.com\u003e\nCc: Huang Ying \u003cying.huang@intel.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Jonathan Corbet \u003ccorbet@lwn.net\u003e escreveu:\nCc: Kirill A. Shutemov \u003ckirill.shutemov@linux.intel.com\u003e\nCc: Michal Hocko \u003cmhocko@kernel.org\u003e\nCc: Minchan Kim \u003cminchan@kernel.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Shaohua Li \u003cshli@kernel.org\u003e\nCc: Vladimir Davydov \u003cvdavydov.dev@gmail.com\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": "279c7b84bd63aad08670f6539a65617f48b8b42c",
      "old_mode": 33188,
      "old_path": "include/linux/swap.h",
      "new_id": "648a32b58e3eff7d26af5ae2dd3b0487ad5c0782",
      "new_mode": 33188,
      "new_path": "include/linux/swap.h"
    },
    {
      "type": "modify",
      "old_id": "844baedd24292f0803ddadb2a2be03a754ec150b",
      "old_mode": 33188,
      "old_path": "mm/swap.c",
      "new_id": "aabf2e90fe32d14b73554c314db20f6d6a554e12",
      "new_mode": 33188,
      "new_path": "mm/swap.c"
    },
    {
      "type": "modify",
      "old_id": "35d7e0ee1c77c9fb94915905e171f82ff859b7da",
      "old_mode": 33188,
      "old_path": "mm/swap_state.c",
      "new_id": "3863acd6189cba35cb0d2a811169b6b69f37981f",
      "new_mode": 33188,
      "new_path": "mm/swap_state.c"
    },
    {
      "type": "modify",
      "old_id": "eb71b5d9430ba73cba79586ddd29acdd2cdbb759",
      "old_mode": 33188,
      "old_path": "mm/swapfile.c",
      "new_id": "66e95eb730407ec02604262de296278aab7b5880",
      "new_mode": 33188,
      "new_path": "mm/swapfile.c"
    }
  ]
}
