)]}'
{
  "commit": "ee378aa49b594da9bda6a2c768cc5b2ad585f911",
  "tree": "33d73f93b93388e92fce1d4f4a5b3ae4100060ba",
  "parents": [
    "552a37e9360a293cd20e7f8ff1fb326a244c5f1e"
  ],
  "author": {
    "name": "Lai Jiangshan",
    "email": "laijs@cn.fujitsu.com",
    "time": "Mon Sep 10 10:03:44 2012 -0700"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Mon Sep 10 10:05:54 2012 -0700"
  },
  "message": "workqueue: fix possible idle worker depletion across CPU hotplug\n\nTo simplify both normal and CPU hotplug paths, worker management is\nprevented while CPU hoplug is in progress.  This is achieved by CPU\nhotplug holding the same exclusion mechanism used by workers to ensure\nthere\u0027s only one manager per pool.\n\nIf someone else seems to be performing the manager role, workers\nproceed to execute work items.  CPU hotplug using the same mechanism\ncan lead to idle worker depletion because all workers could proceed to\nexecute work items while CPU hotplug is in progress and CPU hotplug\nitself wouldn\u0027t actually perform the worker management duty - it\ndoesn\u0027t guarantee that there\u0027s an idle worker left when it releases\nmanagement.\n\nThis idle worker depletion, under extreme circumstances, can break\nforward-progress guarantee and thus lead to deadlock.\n\nThis patch fixes the bug by using separate mechanisms for manager\nexclusion among workers and hotplug exclusion.  For manager exclusion,\nPOOL_MANAGING_WORKERS which was restored by the previous patch is\nused.  pool-\u003emanager_mutex is now only used for exclusion between the\nelected manager and CPU hotplug.  The elected manager won\u0027t proceed\nwithout holding pool-\u003emanager_mutex.\n\nThis ensures that the worker which won the manager position can\u0027t skip\nmanaging while CPU hotplug is in progress.  It will block on\nmanager_mutex and perform management after CPU hotplug is complete.\n\nNote that hotplug may happen while waiting for manager_mutex.  A\nmanager isn\u0027t either on idle or busy list and thus the hoplug code\ncan\u0027t unbind/rebind it.  Make the manager handle its own un/rebinding.\n\ntj: Updated comment and description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "383548ed0b54ad1d12b84e0934e542b7b432622d",
      "old_mode": 33188,
      "old_path": "kernel/workqueue.c",
      "new_id": "1e1373bcb3e3125f72baf77cf396689d18de9bdd",
      "new_mode": 33188,
      "new_path": "kernel/workqueue.c"
    }
  ]
}
