)]}'
{
  "commit": "7dec062cfcf27808dbb70a0b231d1a698792743d",
  "tree": "4ab380290c0ce9c8db493935b6f26e37825378a9",
  "parents": [
    "b56651007fc018effe695a68d48caa6970b23094"
  ],
  "author": {
    "name": "Gabriele Monaco",
    "email": "gmonaco@redhat.com",
    "time": "Thu Nov 20 15:56:53 2025 +0100"
  },
  "committer": {
    "name": "Thomas Gleixner",
    "email": "tglx@linutronix.de",
    "time": "Thu Nov 20 20:17:32 2025 +0100"
  },
  "message": "timers/migration: Exclude isolated cpus from hierarchy\n\nThe timer migration mechanism allows active CPUs to pull timers from\nidle ones to improve the overall idle time. This is however undesired\nwhen CPU intensive workloads run on isolated cores, as the algorithm\nwould move the timers from housekeeping to isolated cores, negatively\naffecting the isolation.\n\nExclude isolated cores from the timer migration algorithm, extend the\nconcept of unavailable cores, currently used for offline ones, to\nisolated ones:\n* A core is unavailable if isolated or offline;\n* A core is available if non isolated and online;\n\nA core is considered unavailable as isolated if it belongs to:\n* the isolcpus (domain) list\n* an isolated cpuset\nExcept if it is:\n* in the nohz_full list (already idle for the hierarchy)\n* the nohz timekeeper core (must be available to handle global timers)\n\nCPUs are added to the hierarchy during late boot, excluding isolated\nones, the hierarchy is also adapted when the cpuset isolation changes.\n\nDue to how the timer migration algorithm works, any CPU part of the\nhierarchy can have their global timers pulled by remote CPUs and have to\npull remote timers, only skipping pulling remote timers would break the\nlogic.\nFor this reason, prevent isolated CPUs from pulling remote global\ntimers, but also the other way around: any global timer started on an\nisolated CPU will run there. This does not break the concept of\nisolation (global timers don\u0027t come from outside the CPU) and, if\nconsidered inappropriate, can usually be mitigated with other isolation\ntechniques (e.g. IRQ pinning).\n\nThis effect was noticed on a 128 cores machine running oslat on the\nisolated cores (1-31,33-63,65-95,97-127). The tool monopolises CPUs,\nand the CPU with lowest count in a timer migration hierarchy (here 1\nand 65) appears as always active and continuously pulls global timers,\nfrom the housekeeping CPUs. This ends up moving driver work (e.g.\ndelayed work) to isolated CPUs and causes latency spikes:\n\nbefore the change:\n\n # oslat -c 1-31,33-63,65-95,97-127 -D 62s\n ...\n  Maximum:     1203 10 3 4 ... 5 (us)\n\nafter the change:\n\n # oslat -c 1-31,33-63,65-95,97-127 -D 62s\n ...\n  Maximum:      10 4 3 4 3 ... 5 (us)\n\nThe same behaviour was observed on a machine with as few as 20 cores /\n40 threads with isocpus set to: 1-9,11-39 with rtla-osnoise-top.\n\nSigned-off-by: Gabriele Monaco \u003cgmonaco@redhat.com\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nTested-by: John B. Wyatt IV \u003cjwyatt@redhat.com\u003e\nReviewed-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nReviewed-by: Frederic Weisbecker \u003cfrederic@kernel.org\u003e\nLink: https://patch.msgid.link/20251120145653.296659-8-gmonaco@redhat.com\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0414d9e6b4fcd5cf41d99de50549693810b9b0d9",
      "old_mode": 33188,
      "old_path": "include/linux/timer.h",
      "new_id": "62e1cea711257e01ed2cd5e2351bff3c0090ccde",
      "new_mode": 33188,
      "new_path": "include/linux/timer.h"
    },
    {
      "type": "modify",
      "old_id": "cf34623fe66f26925480929de085e06850fe7746",
      "old_mode": 33188,
      "old_path": "kernel/cgroup/cpuset.c",
      "new_id": "bfc3b319e1c00cf86e1994640ecce04f064a1555",
      "new_mode": 33188,
      "new_path": "kernel/cgroup/cpuset.c"
    },
    {
      "type": "modify",
      "old_id": "a01c7f8bdf52144471c8e20c58d5421c182a19b3",
      "old_mode": 33188,
      "old_path": "kernel/time/timer_migration.c",
      "new_id": "18dda1aa782d50780c7af32f5c5873f1c1dafab1",
      "new_mode": 33188,
      "new_path": "kernel/time/timer_migration.c"
    }
  ]
}
