)]}'
{
  "commit": "251b97f552b1ad414cc5a9ccc8e4e94503edd5fc",
  "tree": "5d7559154edb8eb2069f39b6be99ffc2484580cd",
  "parents": [
    "cde53535991fbb5c34a1566f25955297c1487b8d"
  ],
  "author": {
    "name": "Peter Zijlstra",
    "email": "a.p.zijlstra@chello.nl",
    "time": "Fri Jul 04 09:59:24 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Jul 04 10:40:04 2008 -0700"
  },
  "message": "mm: dirty page accounting vs VM_MIXEDMAP\n\nDirty page accounting accurately measures the amound of dirty pages in\nwritable shared mappings by mapping the pages RO (as indicated by\nvma_wants_writenotify).  We then trap on first write and call\nset_page_dirty() on the page, after which we map the page RW and\ncontinue execution.\n\nWhen we launder dirty pages, we call clear_page_dirty_for_io() which\nclears both the dirty flag, and maps the page RO again before we start\nwriteout so that the story can repeat itself.\n\nvma_wants_writenotify() excludes VM_PFNMAP on the basis that we cannot\ndo the regular dirty page stuff on raw PFNs and the memory isn\u0027t going\nanywhere anyway.\n\nThe recently introduced VM_MIXEDMAP mixes both !pfn_valid() and\npfn_valid() pages in a single mapping.\n\nWe can\u0027t do dirty page accounting on !pfn_valid() pages as stated\nabove, and mapping them RO causes them to be COW\u0027ed on write, which\nbreaks VM_SHARED semantics.\n\nExcluding VM_MIXEDMAP in vma_wants_writenotify() would mean we don\u0027t do\nthe regular dirty page accounting for the pfn_valid() pages, which\nwould bring back all the head-aches from inaccurate dirty page\naccounting.\n\nSo instead, we let the !pfn_valid() pages get mapped RO, but fix them\nup unconditionally in the fault path.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Nick Piggin \u003cnickpiggin@yahoo.com.au\u003e\nAcked-by: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: \"Jared Hulbert\" \u003cjaredeh@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": "d14b251a25a638dec1b5327a6261a67660ba67d5",
      "old_mode": 33188,
      "old_path": "mm/memory.c",
      "new_id": "350e646032f52ddaefa5c5ee44efa2376261f382",
      "new_mode": 33188,
      "new_path": "mm/memory.c"
    }
  ]
}
