)]}'
{
  "commit": "d59521ad7c154593608f3f6bad0fb48cc8432cdc",
  "tree": "9bb001556312a259e1771f3fa822a7c557ea29ff",
  "parents": [
    "7d502848b17fb089838b40b01b62a3a7df4e758e"
  ],
  "author": {
    "name": "Peter Zijlstra",
    "email": "peterz@infradead.org",
    "time": "Mon Aug 05 13:40:39 2024 +0200"
  },
  "committer": {
    "name": "Peter Zijlstra",
    "email": "peterz@infradead.org",
    "time": "Wed Aug 07 13:56:42 2024 +0200"
  },
  "message": "perf: Add context time freeze\n\nMany of the the context reschedule users are of the form:\n\n  ctx_sched_out(.type \u003d EVENT_TIME);\n  ... modify context\n  ctx_resched();\n\nWith the idea that the whole reschedule happens with a single\ntime-stamp, rather than with each ctx_sched_out() advancing time and\nctx_sched_in() re-starting time, creating a non-atomic experience.\n\nHowever, Kan noticed that since this completely stops time, it\nactually looses a bit of time between the stop and start. Worse, now\nthat we can do partial (per PMU) reschedules, the PMUs that are not\nscheduled out still observe the time glitch.\n\nReplace this with:\n\n  ctx_time_freeze();\n  ... modify context\n  ctx_resched();\n\nWith the assumption that this happens in a perf_ctx_lock() /\nperf_ctx_unlock() pair.\n\nThe new ctx_time_freeze() will update time and sets EVENT_FROZEN, and\nensures EVENT_TIME and EVENT_FROZEN remain set, this avoids\nperf_event_time_now() from observing a time wobble from not seeing\nEVENT_TIME for a little while.\n\nAdditionally, this avoids loosing time between\nctx_sched_out(EVENT_TIME) and ctx_sched_in(), which would re-set the\ntimestamp.\n\nReported-by: Kan Liang \u003ckan.liang@linux.intel.com\u003e\nSigned-off-by: Peter Zijlstra (Intel) \u003cpeterz@infradead.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ab49deae6e6f30ade5b2a1834b005c8f98f56c40",
      "old_mode": 33188,
      "old_path": "kernel/events/core.c",
      "new_id": "197d3be443bbd4054f7b792babeb128f36237c22",
      "new_mode": 33188,
      "new_path": "kernel/events/core.c"
    }
  ]
}
