)]}'
{
  "commit": "2685027fca387b602ae565bff17895188b803988",
  "tree": "8780f502d8f8c1d479300561cb7625dfecab404c",
  "parents": [
    "a7391ad3572431a354c927cf8896e86e50d7d0bf"
  ],
  "author": {
    "name": "Waiman Long",
    "email": "longman@redhat.com",
    "time": "Wed Apr 27 10:54:28 2022 -0400"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Thu May 05 08:57:00 2022 -1000"
  },
  "message": "cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()\n\nThere are 3 places where the cpu and node masks of the top cpuset can\nbe initialized in the order they are executed:\n 1) start_kernel -\u003e cpuset_init()\n 2) start_kernel -\u003e cgroup_init() -\u003e cpuset_bind()\n 3) kernel_init_freeable() -\u003e do_basic_setup() -\u003e cpuset_init_smp()\n\nThe first cpuset_init() call just sets all the bits in the masks.\nThe second cpuset_bind() call sets cpus_allowed and mems_allowed to the\ndefault v2 values. The third cpuset_init_smp() call sets them back to\nv1 values.\n\nFor systems with cgroup v2 setup, cpuset_bind() is called once.  As a\nresult, cpu and memory node hot add may fail to update the cpu and node\nmasks of the top cpuset to include the newly added cpu or node in a\ncgroup v2 environment.\n\nFor systems with cgroup v1 setup, cpuset_bind() is called again by\nrebind_subsystem() when the v1 cpuset filesystem is mounted as shown\nin the dmesg log below with an instrumented kernel.\n\n  [    2.609781] cpuset_bind() called - v2 \u003d 1\n  [    3.079473] cpuset_init_smp() called\n  [    7.103710] cpuset_bind() called - v2 \u003d 0\n\nsmp_init() is called after the first two init functions.  So we don\u0027t\nhave a complete list of active cpus and memory nodes until later in\ncpuset_init_smp() which is the right time to set up effective_cpus\nand effective_mems.\n\nTo fix this cgroup v2 mask setup problem, the potentially incorrect\ncpus_allowed \u0026 mems_allowed setting in cpuset_init_smp() are removed.\nFor cgroup v2 systems, the initial cpuset_bind() call will set the masks\ncorrectly.  For cgroup v1 systems, the second call to cpuset_bind()\nwill do the right setup.\n\ncc: stable@vger.kernel.org\nSigned-off-by: Waiman Long \u003clongman@redhat.com\u003e\nTested-by: Feng Tang \u003cfeng.tang@intel.com\u003e\nReviewed-by: Michal Koutný \u003cmkoutny@suse.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9390bfd9f1cd382e6e08a9d12df051fd3722c636",
      "old_mode": 33188,
      "old_path": "kernel/cgroup/cpuset.c",
      "new_id": "71a418858a5e0d9861131c600bec5efd62b5ae4a",
      "new_mode": 33188,
      "new_path": "kernel/cgroup/cpuset.c"
    }
  ]
}
