)]}'
{
  "commit": "ac79f78dab892fcdc11fda8af5cc5e80d09dca8a",
  "tree": "e774a6c484bb2272dbbcb3d7c9253dd92fac5d39",
  "parents": [
    "4d856f72c10ecb060868ed10ff1b1453943fc6c8"
  ],
  "author": {
    "name": "David Rientjes",
    "email": "rientjes@google.com",
    "time": "Wed Sep 04 12:54:18 2019 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Sat Sep 28 14:05:38 2019 -0700"
  },
  "message": "Revert \"Revert \"mm, thp: restore node-local hugepage allocations\"\"\n\nThis reverts commit a8282608c88e08b1782141026eab61204c1e533f.\n\nThe commit references the original intended semantic for MADV_HUGEPAGE\nwhich has subsequently taken on three unique purposes:\n\n - enables or disables thp for a range of memory depending on the system\u0027s\n   config (is thp \"enabled\" set to \"always\" or \"madvise\"),\n\n - determines the synchronous compaction behavior for thp allocations at\n   fault (is thp \"defrag\" set to \"always\", \"defer+madvise\", or \"madvise\"),\n   and\n\n - reverts a previous MADV_NOHUGEPAGE (there is no madvise mode to only\n   clear previous hugepage advice).\n\nThese are the three purposes that currently exist in 5.2 and over the\npast several years that userspace has been written around.  Adding a\nNUMA locality preference adds a fourth dimension to an already conflated\nadvice mode.\n\nBased on the semantic that MADV_HUGEPAGE has provided over the past\nseveral years, there exist workloads that use the tunable based on these\nprinciples: specifically that the allocation should attempt to\ndefragment a local node before falling back.  It is agreed that remote\nhugepages typically (but not always) have a better access latency than\nremote native pages, although on Naples this is at parity for\nintersocket.\n\nThe revert commit that this patch reverts allows hugepage allocation to\nimmediately allocate remotely when local memory is fragmented.  This is\ncontrary to the semantic of MADV_HUGEPAGE over the past several years:\nthat is, memory compaction should be attempted locally before falling\nback.\n\nThe performance degradation of remote hugepages over local hugepages on\nRome, for example, is 53.5% increased access latency.  For this reason,\nthe goal is to revert back to the 5.2 and previous behavior that would\nattempt local defragmentation before falling back.  With the patch that\nis reverted by this patch, we see performance degradations at the tail\nbecause the allocator happily allocates the remote hugepage rather than\neven attempting to make a local hugepage available.\n\nzone_reclaim_mode is not a solution to this problem since it does not\nonly impact hugepage allocations but rather changes the memory\nallocation strategy for *all* page allocations.\n\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\nCc: Andrea Arcangeli \u003caarcange@redhat.com\u003e\nCc: Michal Hocko \u003cmhocko@suse.com\u003e\nCc: Mel Gorman \u003cmgorman@suse.de\u003e\nCc: Vlastimil Babka \u003cvbabka@suse.cz\u003e\nCc: Stefan Priebe - Profihost AG \u003cs.priebe@profihost.ag\u003e\nCc: \"Kirill A. Shutemov\" \u003ckirill@shutemov.name\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bac395f1d00a0f9691b12ec6841f2401a10ca4fc",
      "old_mode": 33188,
      "old_path": "include/linux/mempolicy.h",
      "new_id": "5228c62af41659bb7d5ae0e7db00969b9f16ef73",
      "new_mode": 33188,
      "new_path": "include/linux/mempolicy.h"
    },
    {
      "type": "modify",
      "old_id": "de1f15969e2782edd648a43fc5e7c6d7edacb38b",
      "old_mode": 33188,
      "old_path": "mm/huge_memory.c",
      "new_id": "62f0d8e9d76b3e5415a108fd8370344fda6bc4f1",
      "new_mode": 33188,
      "new_path": "mm/huge_memory.c"
    },
    {
      "type": "modify",
      "old_id": "65e0874fce1736a65f8ced74f2a94d3e23d718c9",
      "old_mode": 33188,
      "old_path": "mm/mempolicy.c",
      "new_id": "9c9877a43d5832eb93c5694f36faf3afc0d8663e",
      "new_mode": 33188,
      "new_path": "mm/mempolicy.c"
    }
  ]
}
