)]}'
{
  "commit": "60c057bca22285efefbba033624763a778f243bf",
  "tree": "8e469c390b5b60ad6b4d7c94bc07522f857032bc",
  "parents": [
    "038366c5cf23ae737b9f72169dd8ade2d105755b"
  ],
  "author": {
    "name": "Lai Jiangshan",
    "email": "laijs@cn.fujitsu.com",
    "time": "Wed Feb 06 18:04:53 2013 -0800"
  },
  "committer": {
    "name": "Tejun Heo",
    "email": "tj@kernel.org",
    "time": "Wed Feb 06 18:04:53 2013 -0800"
  },
  "message": "workqueue: add delayed_work-\u003ewq to simplify reentrancy handling\n\nTo avoid executing the same work item from multiple CPUs concurrently,\na work_struct records the last pool it was on in its -\u003edata so that,\non the next queueing, the pool can be queried to determine whether the\nwork item is still executing or not.\n\nA delayed_work goes through timer before actually being queued on the\ntarget workqueue and the timer needs to know the target workqueue and\nCPU.  This is currently achieved by modifying delayed_work-\u003ework.data\nsuch that it points to the cwq which points to the target workqueue\nand the last CPU the work item was on.  __queue_delayed_work()\nextracts the last CPU from delayed_work-\u003ework.data and then combines\nit with the target workqueue to create new work.data.\n\nThe only thing this rather ugly hack achieves is encoding the target\nworkqueue into delayed_work-\u003ework.data without using a separate field,\nwhich could be a trade off one can make; unfortunately, this entangles\nwork-\u003edata management between regular workqueue and delayed_work code\nby setting cwq pointer before the work item is actually queued and\nbecomes a hindrance for further improvements of work-\u003edata handling.\n\nThis can be easily made sane by adding a target workqueue field to\ndelayed_work.  While delayed_work is used widely in the kernel and\nthis does make it a bit larger (\u003c5%), I think this is the right\ntrade-off especially given the prospect of much saner handling of\nwork-\u003edata which currently involves quite tricky memory barrier\ndancing, and don\u0027t expect to see any measureable effect.\n\nAdd delayed_work-\u003ewq and drop the delayed_work-\u003ework.data overloading.\n\ntj: Rewrote the 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": "426c39c2aaa49a9d8f8a1fd0b1eedc30b62f560c",
      "old_mode": 33188,
      "old_path": "include/linux/workqueue.h",
      "new_id": "a3d7556510c3082f337a581a6b7e865c968c619a",
      "new_mode": 33188,
      "new_path": "include/linux/workqueue.h"
    },
    {
      "type": "modify",
      "old_id": "a229a56f3a32cc6879a3a34e2108049e4fc5c5bd",
      "old_mode": 33188,
      "old_path": "kernel/workqueue.c",
      "new_id": "41a502ce38026d1a014b5a344f4066edb788f554",
      "new_mode": 33188,
      "new_path": "kernel/workqueue.c"
    }
  ]
}
