)]}'
{
  "commit": "f619a867e7191f87e3fc310885aae054993ce9da",
  "tree": "93572037481cdfa14773a167de244587ca2b87f3",
  "parents": [
    "34bace6b7fabe6bd2f537f89bd74c7ca64699468"
  ],
  "author": {
    "name": "Paul E. McKenney",
    "email": "paulmck@kernel.org",
    "time": "Mon Oct 12 10:03:33 2026 -0700"
  },
  "committer": {
    "name": "Paul E. McKenney",
    "email": "paulmck@kernel.org",
    "time": "Mon Oct 12 10:09:59 2026 -0700"
  },
  "message": "sched: Add check for lost wakeups in idle loop\n\nNote: Diagnostic only, not intended for mainline.\n\nThe scheduler can lose wakeups, as can be seen by making the rcutorture\nTREE01 scenario enable RCU priority boosting without also enabling testing\nof RCU priority boosting.  The following pair of commits in my -rcu tree\n[1] make these changes:\n\nc7684673c6ca (\"EXP rcutorture: Enable RCU_BOOST where supported\")\n4b08261f7bff (\"EXP rcutorture: Disable RCU priority boost testing on non-TREE03 scenarios\")\n\nThe following command reproduces this problem, which shows up as RCU\nCPU stall warnings on rcu_torture_reader() kthreads:\n\ntools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 20m --configs \u002719*TREE01\u0027 --bootargs \"nohz\u003doff rcutorture.onoff_interval\u003d0 rcutorture.nocbs_nthreads\u003d0 rcutorture.shuffle_interval\u003d0\" --trust-make\n\nThe following pair of commits add diagnostics that show that the kthread\ncausing the stall is consistently preempted on an idle CPU:\n\n49be2ba9f0fa (\"rcu: Add running and boosted indications to RCU task stall dump\")\ne3bbe32c1fd9 (\"EXP rcu: Print CPU that preempted stalled reader wants to run on\")\n\nIt appears that the cause of this issue is the wakeup racing with the\ntarget CPU entering the idle loop.  This patch does a recheck of flags to\ndetect this condition and exit the idle loop when detected.  Note that\nthis is *not* a complete fix in the general case because the wakeup\nmight happen just after this check.  However, it does appear to work\nfor the above reproducer because of the nohz\u003doff kernel boot parameter.\n\nThis patch also splats when the recheck detects a racing wakeup, which\nhelps demonstrate that this patch is actually doing something.\n\nAn alternative work-around for this issue within RCU may be found here:\n\n34bace6b7fab (\"EXP rcu: Send resched_cpu() to idle CPUs having preempted RCU readers\")\n\nThis commit depends on e3bbe32c1fd9 above, and both have the annoying\nhabit of reaching into scheduler internals to gain access to the\ncpu_curr() function.\n\n[1] https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git\n\nAssisted-by: LLM\nNot-signed-off-by: Paul E. McKenney \u003cpaulmck@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eb73b65ce6c4714db1e07066c86a8cf39adbc328",
      "old_mode": 33188,
      "old_path": "kernel/sched/idle.c",
      "new_id": "90f2dfc67e2d04327812cef8b25a954d02f9a76f",
      "new_mode": 33188,
      "new_path": "kernel/sched/idle.c"
    }
  ]
}
