)]}'
{
  "commit": "a75f232ce0fe38bd01301899ecd97ffd0254316a",
  "tree": "f2cdf5268b5c52ea8584097a3eb571560f40fe47",
  "parents": [
    "fd16618e12a05df79a3439d72d5ffdac5d34f3da"
  ],
  "author": {
    "name": "Dan Streetman",
    "email": "ddstreet@ieee.org",
    "time": "Wed Jun 04 16:09:57 2014 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Jun 04 16:54:07 2014 -0700"
  },
  "message": "lib/plist: add plist_requeue\n\nAdd plist_requeue(), which moves the specified plist_node after all other\nsame-priority plist_nodes in the list.  This is essentially an optimized\nplist_del() followed by plist_add().\n\nThis is needed by swap, which (with the next patch in this set) uses a\nplist of available swap devices.  When a swap device (either a swap\npartition or swap file) are added to the system with swapon(), the device\nis added to a plist, ordered by the swap device\u0027s priority.  When swap\nneeds to allocate a page from one of the swap devices, it takes the page\nfrom the first swap device on the plist, which is the highest priority\nswap device.  The swap device is left in the plist until all its pages are\nused, and then removed from the plist when it becomes full.\n\nHowever, as described in man 2 swapon, swap must allocate pages from swap\ndevices with the same priority in round-robin order; to do this, on each\nswap page allocation, swap uses a page from the first swap device in the\nplist, and then calls plist_requeue() to move that swap device entry to\nafter any other same-priority swap devices.  The next swap page allocation\nwill again use a page from the first swap device in the plist and requeue\nit, and so on, resulting in round-robin usage of equal-priority swap\ndevices.\n\nAlso add plist_test_requeue() test function, for use by plist_test() to\ntest plist_requeue() function.\n\nSigned-off-by: Dan Streetman \u003cddstreet@ieee.org\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nAcked-by: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Paul Gortmaker \u003cpaul.gortmaker@windriver.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Shaohua Li \u003cshli@fusionio.com\u003e\nCc: Hugh Dickins \u003chughd@google.com\u003e\nCc: Dan Streetman \u003cddstreet@ieee.org\u003e\nCc: Michal Hocko \u003cmhocko@suse.cz\u003e\nCc: Christian Ehrhardt \u003cehrhardt@linux.vnet.ibm.com\u003e\nCc: Weijie Yang \u003cweijieut@gmail.com\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Johannes Weiner \u003channes@cmpxchg.org\u003e\nCc: Bob Liu \u003cbob.liu@oracle.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": "c81549119bd4906a770ddadc6de1ea72f35f9739",
      "old_mode": 33188,
      "old_path": "include/linux/plist.h",
      "new_id": "8b6c970cff6c45b8805a30bfe2d0ad0f3600a0d9",
      "new_mode": 33188,
      "new_path": "include/linux/plist.h"
    },
    {
      "type": "modify",
      "old_id": "1ebc95f7a46f40bb36cb04e180f9a07696185bc8",
      "old_mode": 33188,
      "old_path": "lib/plist.c",
      "new_id": "0f2084d30798b2f9b3bd948ed82504a733493820",
      "new_mode": 33188,
      "new_path": "lib/plist.c"
    }
  ]
}
