)]}'
{
  "commit": "8d495477d62e4397207f22a432fcaa86d9f2bc2d",
  "tree": "ce4a558f94f134db1ad239bf4c4b2556c578923d",
  "parents": [
    "f83eeb1a01689b2691f6f56629ac9f66de8d41c2"
  ],
  "author": {
    "name": "Frederic Weisbecker",
    "email": "frederic@kernel.org",
    "time": "Thu Oct 03 18:17:45 2019 +0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@kernel.org",
    "time": "Wed Oct 09 12:39:26 2019 +0200"
  },
  "message": "sched/cputime: Spare a seqcount lock/unlock cycle on context switch\n\nOn context switch we are locking the vtime seqcount of the scheduling-out\ntask twice:\n\n * On vtime_task_switch_common(), when we flush the pending vtime through\n   vtime_account_system()\n\n * On arch_vtime_task_switch() to reset the vtime state.\n\nThis is pointless as these actions can be performed without the need\nto unlock/lock in the middle. The reason these steps are separated is to\nconsolidate a very small amount of common code between\nCONFIG_VIRT_CPU_ACCOUNTING_GEN and CONFIG_VIRT_CPU_ACCOUNTING_NATIVE.\n\nPerformance in this fast path is definitely a priority over artificial\ncode factorization so split the task switch code between GEN and\nNATIVE and mutualize the parts than can run under a single seqcount\nlocked block.\n\nAs a side effect, vtime_account_idle() becomes included in the seqcount\nprotection. This happens to be a welcome preparation in order to\nproperly support kcpustat under vtime in the future and fetch\nCPUTIME_IDLE without race.\n\nSigned-off-by: Frederic Weisbecker \u003cfrederic@kernel.org\u003e\nSigned-off-by: Peter Zijlstra (Intel) \u003cpeterz@infradead.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Rik van Riel \u003criel@redhat.com\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Wanpeng Li \u003cwanpengli@tencent.com\u003e\nCc: Yauheni Kaliuta \u003cyauheni.kaliuta@redhat.com\u003e\nLink: https://lkml.kernel.org/r/20191003161745.28464-3-frederic@kernel.org\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2fd247f90408ddfc03bb336d521d10a8b85adbc1",
      "old_mode": 33188,
      "old_path": "include/linux/vtime.h",
      "new_id": "d9160ab3667ae26f43e2b5c5b78eebe76049f960",
      "new_mode": 33188,
      "new_path": "include/linux/vtime.h"
    },
    {
      "type": "modify",
      "old_id": "b45932e278575014ec26201f75ee88dee1f653c2",
      "old_mode": 33188,
      "old_path": "kernel/sched/cputime.c",
      "new_id": "cef23c211f419c95fd78acb36ae0619d9254601f",
      "new_mode": 33188,
      "new_path": "kernel/sched/cputime.c"
    }
  ]
}
