)]}'
{
  "commit": "f39d47ff819ed52a2afbdbecbe35f23f7755f58d",
  "tree": "6fcd6c2b9f6e7416da43065d866bd40d68bb9bc4",
  "parents": [
    "136e0b8eabb2913b589fc7fbd418f4d6805dbb56"
  ],
  "author": {
    "name": "Stephane Eranian",
    "email": "eranian@google.com",
    "time": "Tue Feb 07 14:39:57 2012 +0100"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Tue Feb 07 16:58:56 2012 +0100"
  },
  "message": "perf: Fix double start/stop in x86_pmu_start()\n\nThe following patch fixes a bug introduced by the following\ncommit:\n\n        e050e3f0a71b (\"perf: Fix broken interrupt rate throttling\")\n\nThe patch caused the following warning to pop up depending on\nthe sampling frequency adjustments:\n\n  ------------[ cut here ]------------\n  WARNING: at arch/x86/kernel/cpu/perf_event.c:995 x86_pmu_start+0x79/0xd4()\n\nIt was caused by the following call sequence:\n\nperf_adjust_freq_unthr_context.part() {\n     stop()\n     if (delta \u003e 0) {\n          perf_adjust_period() {\n              if (period \u003e 8*...) {\n                  stop()\n                  ...\n                  start()\n              }\n          }\n      }\n      start()\n}\n\nWhich caused a double start and a double stop, thus triggering\nthe assert in x86_pmu_start().\n\nThe patch fixes the problem by avoiding the double calls. We\npass a new argument to perf_adjust_period() to indicate whether\nor not the event is already stopped. We can\u0027t just remove the\nstart/stop from that function because it\u0027s called from\n__perf_event_overflow where the event needs to be reloaded via a\nstop/start back-toback call.\n\nThe patch reintroduces the assertion in x86_pmu_start() which\nwas removed by commit:\n\n\t84f2b9b (\"perf: Remove deprecated WARN_ON_ONCE()\")\n\nIn this second version, we\u0027ve added calls to disable/enable PMU\nduring unthrottling or frequency adjustment based on bug report\nof spurious NMI interrupts from Eric Dumazet.\n\nReported-and-tested-by: Eric Dumazet \u003ceric.dumazet@gmail.com\u003e\nSigned-off-by: Stephane Eranian \u003ceranian@google.com\u003e\nAcked-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: markus@trippelsdorf.de\nCc: paulus@samba.org\nLink: http://lkml.kernel.org/r/20120207133956.GA4932@quad\n[ Minor edits to the changelog and to the code ]\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2a30e5ae6acf2cdabf102ca1c63a367b207a8d2a",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/cpu/perf_event.c",
      "new_id": "5adce1040b118c597daf067e675896eb2100f808",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/cpu/perf_event.c"
    },
    {
      "type": "modify",
      "old_id": "ba36013cfb21db82a7be6587f32434c4d4e173aa",
      "old_mode": 33188,
      "old_path": "kernel/events/core.c",
      "new_id": "1b5c081d8b9f9c8ea05f1a8ecaf861f80ab7ba1c",
      "new_mode": 33188,
      "new_path": "kernel/events/core.c"
    }
  ]
}
