)]}'
{
  "commit": "7f6575f1fb963d5231afbceecd3feadb6ab58cd3",
  "tree": "b66acd09037319c1489e97e78f44b5dcdafda523",
  "parents": [
    "c78a4bcd1a879b39fb7646c887b0c195f1018909"
  ],
  "author": {
    "name": "Frederic Weisbecker",
    "email": "fweisbec@gmail.com",
    "time": "Sat Feb 23 17:28:45 2013 +0100"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@kernel.org",
    "time": "Sun Feb 24 12:57:16 2013 +0100"
  },
  "message": "cputime: Use local_clock() for full dynticks cputime accounting\n\nRunning the full dynticks cputime accounting with preemptible\nkernel debugging trigger the following warning:\n\n\t[    4.488303] BUG: using smp_processor_id() in preemptible [00000000] code: init/1\n\t[    4.490971] caller is native_sched_clock+0x22/0x80\n\t[    4.493663] Pid: 1, comm: init Not tainted 3.8.0+ #13\n\t[    4.496376] Call Trace:\n\t[    4.498996]  [\u003cffffffff813410eb\u003e] debug_smp_processor_id+0xdb/0xf0\n\t[    4.501716]  [\u003cffffffff8101e642\u003e] native_sched_clock+0x22/0x80\n\t[    4.504434]  [\u003cffffffff8101db99\u003e] sched_clock+0x9/0x10\n\t[    4.507185]  [\u003cffffffff81096ccd\u003e] fetch_task_cputime+0xad/0x120\n\t[    4.509916]  [\u003cffffffff81096dd5\u003e] task_cputime+0x35/0x60\n\t[    4.512622]  [\u003cffffffff810f146e\u003e] acct_update_integrals+0x1e/0x40\n\t[    4.515372]  [\u003cffffffff8117d2cf\u003e] do_execve_common+0x4ff/0x5c0\n\t[    4.518117]  [\u003cffffffff8117cf14\u003e] ? do_execve_common+0x144/0x5c0\n\t[    4.520844]  [\u003cffffffff81867a10\u003e] ? rest_init+0x160/0x160\n\t[    4.523554]  [\u003cffffffff8117d457\u003e] do_execve+0x37/0x40\n\t[    4.526276]  [\u003cffffffff810021a3\u003e] run_init_process+0x23/0x30\n\t[    4.528953]  [\u003cffffffff81867aac\u003e] kernel_init+0x9c/0xf0\n\t[    4.531608]  [\u003cffffffff8188356c\u003e] ret_from_fork+0x7c/0xb0\n\nWe use sched_clock() to perform and fixup the cputime\naccounting. However we are calling it with preemption enabled\nfrom the read side, which trigger the bug above.\n\nTo fix this up, use local_clock() instead. It takes care of\npreemption and also provide a more reliable clock source. This\nis welcome for this kind of statistic that is widely relied on\nin userspace.\n\nReported-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nReported-by: Ingo Molnar \u003cmingo@kernel.org\u003e\nSuggested-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nCc: Li Zhong \u003czhong@linux.vnet.ibm.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Kevin Hilman \u003ckhilman@linaro.org\u003e\nLink: http://lkml.kernel.org/r/1361636925-22288-3-git-send-email-fweisbec@gmail.com\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9857329ed2804a6b3255bd402a73722b8ae33ecc",
      "old_mode": 33188,
      "old_path": "kernel/sched/cputime.c",
      "new_id": "ed12cbb135f4b8ded0d3c7be26a67d1df8d2ffc2",
      "new_mode": 33188,
      "new_path": "kernel/sched/cputime.c"
    }
  ]
}
