)]}'
{
  "commit": "b813e931b4c8235bb42e301096ea97dbdee3e8fe",
  "tree": "f8182687bffe8e3b95bac69b2cc7fdfe674ddc53",
  "parents": [
    "f79f177c25016647cc92ffac8afa7cb96ce47011"
  ],
  "author": {
    "name": "David Rientjes",
    "email": "rientjes@google.com",
    "time": "Sun May 06 14:49:24 2007 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Mon May 07 12:12:52 2007 -0700"
  },
  "message": "smaps: add clear_refs file to clear reference\n\nAdds /proc/pid/clear_refs.  When any non-zero number is written to this file,\npte_mkold() and ClearPageReferenced() is called for each pte and its\ncorresponding page, respectively, in that task\u0027s VMAs.  This file is only\nwritable by the user who owns the task.\n\nIt is now possible to measure _approximately_ how much memory a task is using\nby clearing the reference bits with\n\n\techo 1 \u003e /proc/pid/clear_refs\n\nand checking the reference count for each VMA from the /proc/pid/smaps output\nat a measured time interval.  For example, to observe the approximate change\nin memory footprint for a task, write a script that clears the references\n(echo 1 \u003e /proc/pid/clear_refs), sleeps, and then greps for Pgs_Referenced and\nextracts the size in kB.  Add the sizes for each VMA together for the total\nreferenced footprint.  Moments later, repeat the process and observe the\ndifference.\n\nFor example, using an efficient Mozilla:\n\n\taccumulated time\t\treferenced memory\n\t----------------\t\t-----------------\n\t\t 0 s\t\t\t\t 408 kB\n\t\t 1 s\t\t\t\t 408 kB\n\t\t 2 s\t\t\t\t 556 kB\n\t\t 3 s\t\t\t\t1028 kB\n\t\t 4 s\t\t\t\t 872 kB\n\t\t 5 s\t\t\t\t1956 kB\n\t\t 6 s\t\t\t\t 416 kB\n\t\t 7 s\t\t\t\t1560 kB\n\t\t 8 s\t\t\t\t2336 kB\n\t\t 9 s\t\t\t\t1044 kB\n\t\t10 s\t\t\t\t 416 kB\n\nThis is a valuable tool to get an approximate measurement of the memory\nfootprint for a task.\n\nCc: Hugh Dickins \u003chugh@veritas.com\u003e\nCc: Paul Mundt \u003clethal@linux-sh.org\u003e\nCc: Christoph Lameter \u003cclameter@sgi.com\u003e\nSigned-off-by: David Rientjes \u003crientjes@google.com\u003e\n[akpm@linux-foundation.org: build fixes]\n[mpm@selenic.com: rename for_each_pmd]\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": "7aaf09b86a552210584f6e346ad903b10a9cb0b6",
      "old_mode": 33188,
      "old_path": "Documentation/filesystems/proc.txt",
      "new_id": "3f4b226572e7fd39cea5cd6547dd80a2627f928b",
      "new_mode": 33188,
      "new_path": "Documentation/filesystems/proc.txt"
    },
    {
      "type": "modify",
      "old_id": "989af5e55d1bec761b8a2604d6e8528713d7d8da",
      "old_mode": 33188,
      "old_path": "fs/proc/base.c",
      "new_id": "ec158dd02b3ac2b758fbbf527820c1f0f83a486a",
      "new_mode": 33188,
      "new_path": "fs/proc/base.c"
    },
    {
      "type": "modify",
      "old_id": "199088ee969b1ec956fb85337e614c9ec42c92ab",
      "old_mode": 33188,
      "old_path": "fs/proc/task_mmu.c",
      "new_id": "4008c060f7ef1b2b9ddc51154d30e1ec865906a5",
      "new_mode": 33188,
      "new_path": "fs/proc/task_mmu.c"
    },
    {
      "type": "modify",
      "old_id": "be4652a0545a0226cb23264e923f9692968e866b",
      "old_mode": 33188,
      "old_path": "include/linux/proc_fs.h",
      "new_id": "f4f7a63cae1f858f3779adf9b607d526b3fa038b",
      "new_mode": 33188,
      "new_path": "include/linux/proc_fs.h"
    }
  ]
}
