)]}'
{
  "log": [
    {
      "commit": "c0158ca64da5732dfb86a3f28944e9626776692f",
      "tree": "2ce9ff8057b9273905424b2932b35a080cfdbf38",
      "parents": [
        "ddffeb8c4d0331609ef2581d84de4d763607bd37"
      ],
      "author": {
        "name": "Dan Magenheimer",
        "email": "dan.magenheimer@oracle.com",
        "time": "Thu Oct 18 16:31:37 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Oct 24 12:38:16 2012 -0700"
      },
      "message": "workqueue: cancel_delayed_work() should return %false if work item is idle\n\n57b30ae77b (\"workqueue: reimplement cancel_delayed_work() using\ntry_to_grab_pending()\") made cancel_delayed_work() always return %true\nunless someone else is also trying to cancel the work item, which is\nbroken - if the target work item is idle, the return value should be\n%false.\n\ntry_to_grab_pending() indicates that the target work item was idle by\nzero return value.  Use it for return.  Note that this brings\ncancel_delayed_work() in line with __cancel_work_timer() in return\nvalue handling.\n\nSigned-off-by: Dan Magenheimer \u003cdan.magenheimer@oracle.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nLKML-Reference: \u003c444a6439-b1a4-4740-9e7e-bc37267cfe73@default\u003e\n"
    },
    {
      "commit": "033d9959ed2dc1029217d4165f80a71702dc578e",
      "tree": "3d306316e44bdabce2e0bf2ef7e466e525f90b4c",
      "parents": [
        "974a847e00cf3ff1695e62b276892137893706ab",
        "7c6e72e46c9ea4a88f3f8ba96edce9db4bd48726"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 02 09:54:49 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 02 09:54:49 2012 -0700"
      },
      "message": "Merge branch \u0027for-3.7\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq\n\nPull workqueue changes from Tejun Heo:\n \"This is workqueue updates for v3.7-rc1.  A lot of activities this\n  round including considerable API and behavior cleanups.\n\n   * delayed_work combines a timer and a work item.  The handling of the\n     timer part has always been a bit clunky leading to confusing\n     cancelation API with weird corner-case behaviors.  delayed_work is\n     updated to use new IRQ safe timer and cancelation now works as\n     expected.\n\n   * Another deficiency of delayed_work was lack of the counterpart of\n     mod_timer() which led to cancel+queue combinations or open-coded\n     timer+work usages.  mod_delayed_work[_on]() are added.\n\n     These two delayed_work changes make delayed_work provide interface\n     and behave like timer which is executed with process context.\n\n   * A work item could be executed concurrently on multiple CPUs, which\n     is rather unintuitive and made flush_work() behavior confusing and\n     half-broken under certain circumstances.  This problem doesn\u0027t\n     exist for non-reentrant workqueues.  While non-reentrancy check\n     isn\u0027t free, the overhead is incurred only when a work item bounces\n     across different CPUs and even in simulated pathological scenario\n     the overhead isn\u0027t too high.\n\n     All workqueues are made non-reentrant.  This removes the\n     distinction between flush_[delayed_]work() and\n     flush_[delayed_]_work_sync().  The former is now as strong as the\n     latter and the specified work item is guaranteed to have finished\n     execution of any previous queueing on return.\n\n   * In addition to the various bug fixes, Lai redid and simplified CPU\n     hotplug handling significantly.\n\n   * Joonsoo introduced system_highpri_wq and used it during CPU\n     hotplug.\n\n  There are two merge commits - one to pull in IRQ safe timer from\n  tip/timers/core and the other to pull in CPU hotplug fixes from\n  wq/for-3.6-fixes as Lai\u0027s hotplug restructuring depended on them.\"\n\nFixed a number of trivial conflicts, but the more interesting conflicts\nwere silent ones where the deprecated interfaces had been used by new\ncode in the merge window, and thus didn\u0027t cause any real data conflicts.\n\nTejun pointed out a few of them, I fixed a couple more.\n\n* \u0027for-3.7\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (46 commits)\n  workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending()\n  workqueue: use cwq_set_max_active() helper for workqueue_set_max_active()\n  workqueue: introduce cwq_set_max_active() helper for thaw_workqueues()\n  workqueue: remove @delayed from cwq_dec_nr_in_flight()\n  workqueue: fix possible stall on try_to_grab_pending() of a delayed work item\n  workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback()\n  workqueue: use __cpuinit instead of __devinit for cpu callbacks\n  workqueue: rename manager_mutex to assoc_mutex\n  workqueue: WORKER_REBIND is no longer necessary for idle rebinding\n  workqueue: WORKER_REBIND is no longer necessary for busy rebinding\n  workqueue: reimplement idle worker rebinding\n  workqueue: deprecate __cancel_delayed_work()\n  workqueue: reimplement cancel_delayed_work() using try_to_grab_pending()\n  workqueue: use mod_delayed_work() instead of __cancel + queue\n  workqueue: use irqsafe timer for delayed_work\n  workqueue: clean up delayed_work initializers and add missing one\n  workqueue: make deferrable delayed_work initializer names consistent\n  workqueue: cosmetic whitespace updates for macro definitions\n  workqueue: deprecate system_nrt[_freezable]_wq\n  workqueue: deprecate flush[_delayed]_work_sync()\n  ...\n"
    },
    {
      "commit": "7c6e72e46c9ea4a88f3f8ba96edce9db4bd48726",
      "tree": "05f92ef6f69cfa5f0aac1401c4ca4d4fdc2a7ab7",
      "parents": [
        "70369b117a8fc5ac18a635ced23ee49f8e722e7b"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Sep 20 10:03:19 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Sep 20 10:03:19 2012 -0700"
      },
      "message": "workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending()\n\ne0aecdd874 (\"workqueue: use irqsafe timer for delayed_work\") made\ntry_to_grab_pending() safe to use from irq context but forgot to\nremove WARN_ON_ONCE(in_irq()).  Remove it.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\n"
    },
    {
      "commit": "70369b117a8fc5ac18a635ced23ee49f8e722e7b",
      "tree": "deec5ade1639ccebe8db218e5b8a5632d86317ac",
      "parents": [
        "9f4bd4cddbb50d7617353102e10ce511c5ef6df2"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Sep 19 10:40:48 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Sep 19 10:40:48 2012 -0700"
      },
      "message": "workqueue: use cwq_set_max_active() helper for workqueue_set_max_active()\n\nworkqueue_set_max_active() may increase -\u003emax_active without\nactivating delayed works and may make the activation order differ from\nthe queueing order.  Both aren\u0027t strictly bugs but the resulting\nbehavior could be a bit odd.\n\nTo make things more consistent, use cwq_set_max_active() helper which\nimmediately makes use of the newly increased max_mactive if there are\ndelayed work items and also keeps the activation order.\n\ntj: Slight update to description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "9f4bd4cddbb50d7617353102e10ce511c5ef6df2",
      "tree": "2f204e107cb878fcc4c0152fe167133570376cc9",
      "parents": [
        "b3f9f405a21a29c06c31fb2d6ab36ef9ba7c027b"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Sep 19 10:40:48 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Sep 19 10:40:48 2012 -0700"
      },
      "message": "workqueue: introduce cwq_set_max_active() helper for thaw_workqueues()\n\nUsing a helper instead of open code makes thaw_workqueues() clearer.\nThe helper will also be used by the next patch.\n\ntj: Slight update to comment and description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "ed48ece27cd3d5ee0354c32bbaec0f3e1d4715c3",
      "tree": "9ead3fba10ccd3118e6c4f38ed61cbf2bb2cbb3f",
      "parents": [
        "960bd11bf2daf669d0d910428fd9ef5a15c3d7cb"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 12:48:43 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Sep 19 10:13:12 2012 -0700"
      },
      "message": "workqueue: reimplement work_on_cpu() using system_wq\n\nThe existing work_on_cpu() implementation is hugely inefficient.  It\ncreates a new kthread, execute that single function and then let the\nkthread die on each invocation.\n\nNow that system_wq can handle concurrent executions, there\u0027s no\nadvantage of doing this.  Reimplement work_on_cpu() using system_wq\nwhich makes it simpler and way more efficient.\n\nstable: While this isn\u0027t a fix in itself, it\u0027s needed to fix a\n        workqueue related bug in cpufreq/powernow-k8.  AFAICS, this\n        shouldn\u0027t break other existing users.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Bjorn Helgaas \u003cbhelgaas@google.com\u003e\nCc: Len Brown \u003clenb@kernel.org\u003e\nCc: Rafael J. Wysocki \u003crjw@sisk.pl\u003e\nCc: stable@vger.kernel.org\n"
    },
    {
      "commit": "b3f9f405a21a29c06c31fb2d6ab36ef9ba7c027b",
      "tree": "31ed49e9848c7595c734fc2eb83b54a6ced90a0c",
      "parents": [
        "3aa62497594430ea522050b75c033f71f2c60ee6"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 10:40:00 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 10:40:00 2012 -0700"
      },
      "message": "workqueue: remove @delayed from cwq_dec_nr_in_flight()\n\n@delayed is now always false for all callers, remove it.\n\ntj: Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "3aa62497594430ea522050b75c033f71f2c60ee6",
      "tree": "ce26e616d6d40a7279ec37fe615d717d849c2532",
      "parents": [
        "a5b4e57d7cc07cb28ccf16de0876a4770ae84920"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 10:40:00 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 10:40:00 2012 -0700"
      },
      "message": "workqueue: fix possible stall on try_to_grab_pending() of a delayed work item\n\nCurrently, when try_to_grab_pending() grabs a delayed work item, it\nleaves its linked work items alone on the delayed_works.  The linked\nwork items are always NO_COLOR and will cause future\ncwq_activate_first_delayed() increase cwq-\u003enr_active incorrectly, and\nmay cause the whole cwq to stall.  For example,\n\nstate: cwq-\u003emax_active \u003d 1, cwq-\u003enr_active \u003d 1\n       one work in cwq-\u003epool, many in cwq-\u003edelayed_works.\n\nstep1: try_to_grab_pending() removes a work item from delayed_works\n       but leaves its NO_COLOR linked work items on it.\n\nstep2: Later on, cwq_activate_first_delayed() activates the linked\n       work item increasing -\u003enr_active.\n\nstep3: cwq-\u003enr_active \u003d 1, but all activated work items of the cwq are\n       NO_COLOR.  When they finish, cwq-\u003enr_active will not be\n       decreased due to NO_COLOR, and no further work items will be\n       activated from cwq-\u003edelayed_works. the cwq stalls.\n\nFix it by ensuring the target work item is activated before stealing\nPENDING in try_to_grab_pending().  This ensures that all the linked\nwork items are activated without incorrectly bumping cwq-\u003enr_active.\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\nCc: stable@kernel.org\n"
    },
    {
      "commit": "a5b4e57d7cc07cb28ccf16de0876a4770ae84920",
      "tree": "b73c1549f50a5acc98783e3a29a6612ae4de28ba",
      "parents": [
        "9fdf9b73d61c87a9c16f101bb8bbe069d13046f5"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "message": "workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback()\n\nworkqueue_cpu_down_callback() is used only if HOTPLUG_CPU\u003dy, so\nhotcpu_notifier() fits better than cpu_notifier().\n\nWhen HOTPLUG_CPU\u003dy, hotcpu_notifier() and cpu_notifier() are the same.\n\nWhen HOTPLUG_CPU\u003dn, if we use cpu_notifier(),\nworkqueue_cpu_down_callback() will be called during boot to do\nnothing, and the memory of workqueue_cpu_down_callback() and\ngcwq_unbind_fn() will be discarded after boot.\n\nIf we use hotcpu_notifier(), we can avoid the no-op call of\nworkqueue_cpu_down_callback() and the memory of\nworkqueue_cpu_down_callback() and gcwq_unbind_fn() will be discard at\nbuild time:\n\n$ ls -l kernel/workqueue.o.cpu_notifier kernel/workqueue.o.hotcpu_notifier\n-rw-rw-r-- 1 laijs laijs 484080 Sep 15 11:31 kernel/workqueue.o.cpu_notifier\n-rw-rw-r-- 1 laijs laijs 478240 Sep 15 11:31 kernel/workqueue.o.hotcpu_notifier\n\n$ size kernel/workqueue.o.cpu_notifier kernel/workqueue.o.hotcpu_notifier\n   text\t   data\t    bss\t    dec\t    hex\tfilename\n  18513\t   2387\t   1221\t  22121\t   5669\tkernel/workqueue.o.cpu_notifier\n  18082\t   2355\t   1221\t  21658\t   549a\tkernel/workqueue.o.hotcpu_notifier\n\ntj: Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "9fdf9b73d61c87a9c16f101bb8bbe069d13046f5",
      "tree": "5b77daceffec6c330f66ac13a1687a986344c817",
      "parents": [
        "b2eb83d123c1cc9f96a8e452b26a6ebe631b3ad7"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "message": "workqueue: use __cpuinit instead of __devinit for cpu callbacks\n\nFor workqueue hotplug callbacks, it makes less sense to use __devinit\nwhich discards the memory after boot if !HOTPLUG.  __cpuinit, which\ndiscards the memory after boot if !HOTPLUG_CPU fits better.\n\ntj: Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "b2eb83d123c1cc9f96a8e452b26a6ebe631b3ad7",
      "tree": "0be062bc42bc16e4de48fe1238e61eeb054bdef7",
      "parents": [
        "5f7dabfd5cb115937afb4649e4c73b02f927f6ae"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "message": "workqueue: rename manager_mutex to assoc_mutex\n\nNow that manager_mutex\u0027s role has changed from synchronizing manager\nrole to excluding hotplug against manager, the name is misleading.\n\nAs it is protecting the CPU-association of the gcwq now, rename it to\nassoc_mutex.\n\nThis patch is pure rename and doesn\u0027t introduce any functional change.\n\ntj: Updated comments and description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "5f7dabfd5cb115937afb4649e4c73b02f927f6ae",
      "tree": "9b47bba67879363d70d68e3c9209debaf80aca0a",
      "parents": [
        "eab6d82843ee1df244f8847d1bf8bb89160ec4aa"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 09:59:23 2012 -0700"
      },
      "message": "workqueue: WORKER_REBIND is no longer necessary for idle rebinding\n\nNow both worker destruction and idle rebinding remove the worker from\nidle list while it\u0027s still idle, so list_empty(\u0026worker-\u003eentry) can be\nused to test whether either is pending and WORKER_DIE to distinguish\nbetween the two instead making WORKER_REBIND unnecessary.\n\nUse list_empty(\u0026worker-\u003eentry) to determine whether destruction or\nrebinding is pending.  This simplifies worker state transitions.\n\nWORKER_REBIND is not needed anymore.  Remove it.\n\ntj: Updated comments and description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "eab6d82843ee1df244f8847d1bf8bb89160ec4aa",
      "tree": "86a43e6ae1734779fe54ea5e62408395e6d0b36a",
      "parents": [
        "ea1abd6197d5805655da1bb589929762f4b4aa08"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 09:59:22 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 09:59:22 2012 -0700"
      },
      "message": "workqueue: WORKER_REBIND is no longer necessary for busy rebinding\n\nBecause the old unbind/rebinding implementation wasn\u0027t atomic w.r.t.\nGCWQ_DISASSOCIATED manipulation which is protected by\nglobal_cwq-\u003elock, we had to use two flags, WORKER_UNBOUND and\nWORKER_REBIND, to avoid incorrectly losing all NOT_RUNNING bits with\nback-to-back CPU hotplug operations; otherwise, completion of\nrebinding while another unbinding is in progress could clear UNBIND\nprematurely.\n\nNow that both unbind/rebinding are atomic w.r.t. GCWQ_DISASSOCIATED,\nthere\u0027s no need to use two flags.  Just one is enough.  Don\u0027t use\nWORKER_REBIND for busy rebinding.\n\ntj: Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "ea1abd6197d5805655da1bb589929762f4b4aa08",
      "tree": "6ba4ac400e9243622558b852583d1cdf3ef61b1c",
      "parents": [
        "6c1423ba5dbdab45bcd8c1bc3bc6e07fe3f6a470"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Sep 18 09:59:22 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 18 09:59:22 2012 -0700"
      },
      "message": "workqueue: reimplement idle worker rebinding\n\nCurrently rebind_workers() uses rebinds idle workers synchronously\nbefore proceeding to requesting busy workers to rebind.  This is\nnecessary because all workers on @worker_pool-\u003eidle_list must be bound\nbefore concurrency management local wake-ups from the busy workers\ntake place.\n\nUnfortunately, the synchronous idle rebinding is quite complicated.\nThis patch reimplements idle rebinding to simplify the code path.\n\nRather than trying to make all idle workers bound before rebinding\nbusy workers, we simply remove all to-be-bound idle workers from the\nidle list and let them add themselves back after completing rebinding\n(successful or not).\n\nAs only workers which finished rebinding can on on the idle worker\nlist, the idle worker list is guaranteed to have only bound workers\nunless CPU went down again and local wake-ups are safe.\n\nAfter the change, @worker_pool-\u003enr_idle may deviate than the actual\nnumber of idle workers on @worker_pool-\u003eidle_list.  More specifically,\nnr_idle may be non-zero while -\u003eidle_list is empty.  All users of\n-\u003enr_idle and -\u003eidle_list are audited.  The only affected one is\ntoo_many_workers() which is updated to check %false if -\u003eidle_list is\nempty regardless of -\u003enr_idle.\n\nAfter this patch, rebind_workers() no longer performs the nasty\nidle-rebind retries which require temporary release of gcwq-\u003elock, and\nboth unbinding and rebinding are atomic w.r.t. global_cwq-\u003elock.\n\nworker-\u003eidle_rebind and global_cwq-\u003erebind_hold are now unnecessary\nand removed along with the definition of struct idle_rebind.\n\nChanged from V1:\n\t1) remove unlikely from too_many_workers(), -\u003eidle_list can be empty\n\t   anytime, even before this patch, no reason to use unlikely.\n\t2) fix a small rebasing mistake.\n\t   (which is from rebasing the orignal fixing patch to for-next)\n\t3) add a lot of comments.\n\t4) clear WORKER_REBIND unconditionaly in idle_worker_rebind()\n\ntj: Updated comments and description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "6c1423ba5dbdab45bcd8c1bc3bc6e07fe3f6a470",
      "tree": "3c7899ba9eee94f408faf483622faa23cbdbfed2",
      "parents": [
        "136b5721d75a62a8f02c601c89122e32c1a85a84",
        "960bd11bf2daf669d0d910428fd9ef5a15c3d7cb"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Sep 17 16:07:34 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Sep 17 16:09:09 2012 -0700"
      },
      "message": "Merge branch \u0027for-3.6-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq into for-3.7\n\nThis merge is necessary as Lai\u0027s CPU hotplug restructuring series\ndepends on the CPU hotplug bug fixes in for-3.6-fixes.\n\nThe merge creates one trivial conflict between the following two\ncommits.\n\n 96e65306b8 \"workqueue: UNBOUND -\u003e REBIND morphing in rebind_workers() should be atomic\"\n e2b6a6d570 \"workqueue: use system_highpri_wq for highpri workers in rebind_workers()\"\n\nBoth add local variable definitions to the same block and can be\nmerged in any order.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "960bd11bf2daf669d0d910428fd9ef5a15c3d7cb",
      "tree": "f2649d121f402be4a19a0432a1987615a2e45c09",
      "parents": [
        "ee378aa49b594da9bda6a2c768cc5b2ad585f911"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Sep 17 15:42:31 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Sep 17 15:42:31 2012 -0700"
      },
      "message": "workqueue: always clear WORKER_REBIND in busy_worker_rebind_fn()\n\nbusy_worker_rebind_fn() didn\u0027t clear WORKER_REBIND if rebinding failed\n(CPU is down again).  This used to be okay because the flag wasn\u0027t\nused for anything else.\n\nHowever, after 25511a477 \"workqueue: reimplement CPU online rebinding\nto handle idle workers\", WORKER_REBIND is also used to command idle\nworkers to rebind.  If not cleared, the worker may confuse the next\nCPU_UP cycle by having REBIND spuriously set or oops / get stuck by\nprematurely calling idle_worker_rebind().\n\n  WARNING: at /work/os/wq/kernel/workqueue.c:1323 worker_thread+0x4cd/0x5\n 00()\n  Hardware name: Bochs\n  Modules linked in: test_wq(O-)\n  Pid: 33, comm: kworker/1:1 Tainted: G           O 3.6.0-rc1-work+ #3\n  Call Trace:\n   [\u003cffffffff8109039f\u003e] warn_slowpath_common+0x7f/0xc0\n   [\u003cffffffff810903fa\u003e] warn_slowpath_null+0x1a/0x20\n   [\u003cffffffff810b3f1d\u003e] worker_thread+0x4cd/0x500\n   [\u003cffffffff810bc16e\u003e] kthread+0xbe/0xd0\n   [\u003cffffffff81bd2664\u003e] kernel_thread_helper+0x4/0x10\n  ---[ end trace e977cf20f4661968 ]---\n  BUG: unable to handle kernel NULL pointer dereference at           (null)\n  IP: [\u003cffffffff810b3db0\u003e] worker_thread+0x360/0x500\n  PGD 0\n  Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC\n  Modules linked in: test_wq(O-)\n  CPU 0\n  Pid: 33, comm: kworker/1:1 Tainted: G        W  O 3.6.0-rc1-work+ #3 Bochs Bochs\n  RIP: 0010:[\u003cffffffff810b3db0\u003e]  [\u003cffffffff810b3db0\u003e] worker_thread+0x360/0x500\n  RSP: 0018:ffff88001e1c9de0  EFLAGS: 00010086\n  RAX: 0000000000000000 RBX: ffff88001e633e00 RCX: 0000000000004140\n  RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009\n  RBP: ffff88001e1c9ea0 R08: 0000000000000000 R09: 0000000000000001\n  R10: 0000000000000002 R11: 0000000000000000 R12: ffff88001fc8d580\n  R13: ffff88001fc8d590 R14: ffff88001e633e20 R15: ffff88001e1c6900\n  FS:  0000000000000000(0000) GS:ffff88001fc00000(0000) knlGS:0000000000000000\n  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n  CR2: 0000000000000000 CR3: 00000000130e8000 CR4: 00000000000006f0\n  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n  Process kworker/1:1 (pid: 33, threadinfo ffff88001e1c8000, task ffff88001e1c6900)\n  Stack:\n   ffff880000000000 ffff88001e1c9e40 0000000000000001 ffff88001e1c8010\n   ffff88001e519c78 ffff88001e1c9e58 ffff88001e1c6900 ffff88001e1c6900\n   ffff88001e1c6900 ffff88001e1c6900 ffff88001fc8d340 ffff88001fc8d340\n  Call Trace:\n   [\u003cffffffff810bc16e\u003e] kthread+0xbe/0xd0\n   [\u003cffffffff81bd2664\u003e] kernel_thread_helper+0x4/0x10\n  Code: b1 00 f6 43 48 02 0f 85 91 01 00 00 48 8b 43 38 48 89 df 48 8b 00 48 89 45 90 e8 ac f0 ff ff 3c 01 0f 85 60 01 00 00 48 8b 53 50 \u003c8b\u003e 02 83 e8 01 85 c0 89 02 0f 84 3b 01 00 00 48 8b 43 38 48 8b\n  RIP  [\u003cffffffff810b3db0\u003e] worker_thread+0x360/0x500\n   RSP \u003cffff88001e1c9de0\u003e\n  CR2: 0000000000000000\n\nThere was no reason to keep WORKER_REBIND on failure in the first\nplace - WORKER_UNBOUND is guaranteed to be set in such cases\npreventing incorrectly activating concurrency management.  Always\nclear WORKER_REBIND.\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"
    },
    {
      "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"
    },
    {
      "commit": "552a37e9360a293cd20e7f8ff1fb326a244c5f1e",
      "tree": "00d89d5778d4ab8320f6bf24d81e33a290f9fcb1",
      "parents": [
        "ec58815ab0409a921a7c9744eb4ca44866b14d71"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Sep 10 10:03:33 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Sep 10 10:04:54 2012 -0700"
      },
      "message": "workqueue: restore POOL_MANAGING_WORKERS\n\nThis patch restores POOL_MANAGING_WORKERS which was replaced by\npool-\u003emanager_mutex by 6037315269 \"workqueue: use mutex for global_cwq\nmanager exclusion\".\n\nThere\u0027s a subtle idle worker depletion bug across CPU hotplug events\nand we need to distinguish an actual manager and CPU hotplug\npreventing management.  POOL_MANAGING_WORKERS will be used for the\nformer and manager_mutex the later.\n\nThis patch just lays POOL_MANAGING_WORKERS on top of the existing\nmanager_mutex and doesn\u0027t introduce any synchronization changes.  The\nnext patch will update it.\n\nNote that this patch fixes a non-critical anomaly where\ntoo_many_workers() may return %true spuriously while CPU hotplug is in\nprogress.  While the issue could schedule idle timer spuriously, it\ndidn\u0027t trigger any actual misbehavior.\n\ntj: Rewrote patch description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "ec58815ab0409a921a7c9744eb4ca44866b14d71",
      "tree": "228f1fb9035cc0b3f60fc14707614305608c96d1",
      "parents": [
        "90beca5de591e12482a812f23a7f10690962ed4a"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 04 23:16:32 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Sep 05 16:10:15 2012 -0700"
      },
      "message": "workqueue: fix possible deadlock in idle worker rebinding\n\nCurrently, rebind_workers() and idle_worker_rebind() are two-way\ninterlocked.  rebind_workers() waits for idle workers to finish\nrebinding and rebound idle workers wait for rebind_workers() to finish\nrebinding busy workers before proceeding.\n\nUnfortunately, this isn\u0027t enough.  The second wait from idle workers\nis implemented as follows.\n\n\twait_event(gcwq-\u003erebind_hold, !(worker-\u003eflags \u0026 WORKER_REBIND));\n\nrebind_workers() clears WORKER_REBIND, wakes up the idle workers and\nthen returns.  If CPU hotplug cycle happens again before one of the\nidle workers finishes the above wait_event(), rebind_workers() will\nrepeat the first part of the handshake - set WORKER_REBIND again and\nwait for the idle worker to finish rebinding - and this leads to\ndeadlock because the idle worker would be waiting for WORKER_REBIND to\nclear.\n\nThis is fixed by adding another interlocking step at the end -\nrebind_workers() now waits for all the idle workers to finish the\nabove WORKER_REBIND wait before returning.  This ensures that all\nrebinding steps are complete on all idle workers before the next\nhotplug cycle can happen.\n\nThis problem was diagnosed by Lai Jiangshan who also posted a patch to\nfix the issue, upon which this patch is based.\n\nThis is the minimal fix and further patches are scheduled for the next\nmerge window to simplify the CPU hotplug path.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nOriginal-patch-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nLKML-Reference: \u003c1346516916-1991-3-git-send-email-laijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "90beca5de591e12482a812f23a7f10690962ed4a",
      "tree": "39e6a6e4e22ba49908d5542b4de6c01fbff48744",
      "parents": [
        "96e65306b81351b656835c15931d1d237b252f27"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 04 23:12:33 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Sep 05 16:10:14 2012 -0700"
      },
      "message": "workqueue: move WORKER_REBIND clearing in rebind_workers() to the end of the function\n\nThis doesn\u0027t make any functional difference and is purely to help the\nnext patch to be simpler.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "96e65306b81351b656835c15931d1d237b252f27",
      "tree": "af06187bebae44b48ca8e68a639a4ddc6b0a3509",
      "parents": [
        "0d7614f09c1ebdbaa1599a5aba7593f147bf96ee"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Sun Sep 02 00:28:19 2012 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Sep 04 17:04:45 2012 -0700"
      },
      "message": "workqueue: UNBOUND -\u003e REBIND morphing in rebind_workers() should be atomic\n\nThe compiler may compile the following code into TWO write/modify\ninstructions.\n\n\tworker-\u003eflags \u0026\u003d ~WORKER_UNBOUND;\n\tworker-\u003eflags |\u003d WORKER_REBIND;\n\nso the other CPU may temporarily see worker-\u003eflags which doesn\u0027t have\neither WORKER_UNBOUND or WORKER_REBIND set and perform local wakeup\nprematurely.\n\nFix it by using single explicit assignment via ACCESS_ONCE().\n\nBecause idle workers have another WORKER_NOT_RUNNING flag, this bug\ndoesn\u0027t exist for them; however, update it to use the same pattern for\nconsistency.\n\ntj: Applied the change to idle workers too and updated comments and\n    patch description a bit.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: stable@vger.kernel.org\n"
    },
    {
      "commit": "57b30ae77bf00d2318df711ef9a4d2a9be0a3a2a",
      "tree": "d6e084bf0e2b82bb39302ee0e94e6f3f04762dbc",
      "parents": [
        "e7c2f967445dd2041f0f8e3179cca22bb8bb7f79"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Aug 21 13:18:24 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Aug 21 13:18:24 2012 -0700"
      },
      "message": "workqueue: reimplement cancel_delayed_work() using try_to_grab_pending()\n\ncancel_delayed_work() can\u0027t be called from IRQ handlers due to its use\nof del_timer_sync() and can\u0027t cancel work items which are already\ntransferred from timer to worklist.\n\nAlso, unlike other flush and cancel functions, a canceled delayed_work\nwould still point to the last associated cpu_workqueue.  If the\nworkqueue is destroyed afterwards and the work item is re-used on a\ndifferent workqueue, the queueing code can oops trying to dereference\nalready freed cpu_workqueue.\n\nThis patch reimplements cancel_delayed_work() using\ntry_to_grab_pending() and set_work_cpu_and_clear_pending().  This\nallows the function to be called from IRQ handlers and makes its\nbehavior consistent with other flush / cancel functions.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e0aecdd874d78b7129a64b056c20e529e2c916df",
      "tree": "0eacde209b1f46beb5293537c85ab8217c7023f4",
      "parents": [
        "f991b318cc6627a493b0d317a565bb7c3271f36b"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Aug 21 13:18:24 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Aug 21 13:18:24 2012 -0700"
      },
      "message": "workqueue: use irqsafe timer for delayed_work\n\nUp to now, for delayed_works, try_to_grab_pending() couldn\u0027t be used\nfrom IRQ handlers because IRQs may happen while\ndelayed_work_timer_fn() is in progress leading to indefinite -EAGAIN.\n\nThis patch makes delayed_work use the new TIMER_IRQSAFE flag for\ndelayed_work-\u003etimer.  This makes try_to_grab_pending() and thus\nmod_delayed_work_on() safe to call from IRQ handlers.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "ae930e0f4e66fd540c6fbad9f1e2a7743d8b9afe",
      "tree": "88853ec727834081a79d56bb9829191ca6e243ec",
      "parents": [
        "606a5020b9bdceb20b4f43e11db0054afa349028"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 14:51:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 14:51:23 2012 -0700"
      },
      "message": "workqueue: gut system_nrt[_freezable]_wq()\n\nNow that all workqueues are non-reentrant, system[_freezable]_wq() are\nequivalent to system_nrt[_freezable]_wq().  Replace the latter with\nwrappers around system[_freezable]_wq().  The wrapping goes through\ninline functions so that __deprecated can be added easily.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "606a5020b9bdceb20b4f43e11db0054afa349028",
      "tree": "d5f65b7a94cd4c5987979a814178cc92cf4508d9",
      "parents": [
        "dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 14:51:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 14:51:23 2012 -0700"
      },
      "message": "workqueue: gut flush[_delayed]_work_sync()\n\nNow that all workqueues are non-reentrant, flush[_delayed]_work_sync()\nare equivalent to flush[_delayed]_work().  Drop the separate\nimplementation and make them thin wrappers around\nflush[_delayed]_work().\n\n* start_flush_work() no longer takes @wait_executing as the only left\n  user - flush_work() - always sets it to %true.\n\n* __cancel_work_timer() uses flush_work() instead of wait_on_work().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1",
      "tree": "abbebfe5aa155bda6ea41ab00e7f2c417e1eee6b",
      "parents": [
        "044c782ce3a901fbd17cbe701c592f582381174d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 14:51:23 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 14:51:23 2012 -0700"
      },
      "message": "workqueue: make all workqueues non-reentrant\n\nBy default, each per-cpu part of a bound workqueue operates separately\nand a work item may be executing concurrently on different CPUs.  The\nbehavior avoids some cross-cpu traffic but leads to subtle weirdities\nand not-so-subtle contortions in the API.\n\n* There\u0027s no sane usefulness in allowing a single work item to be\n  executed concurrently on multiple CPUs.  People just get the\n  behavior unintentionally and get surprised after learning about it.\n  Most either explicitly synchronize or use non-reentrant/ordered\n  workqueue but this is error-prone.\n\n* flush_work() can\u0027t wait for multiple instances of the same work item\n  on different CPUs.  If a work item is executing on cpu0 and then\n  queued on cpu1, flush_work() can only wait for the one on cpu1.\n\n  Unfortunately, work items can easily cross CPU boundaries\n  unintentionally when the queueing thread gets migrated.  This means\n  that if multiple queuers compete, flush_work() can\u0027t even guarantee\n  that the instance queued right before it is finished before\n  returning.\n\n* flush_work_sync() was added to work around some of the deficiencies\n  of flush_work().  In addition to the usual flushing, it ensures that\n  all currently executing instances are finished before returning.\n  This operation is expensive as it has to walk all CPUs and at the\n  same time fails to address competing queuer case.\n\n  Incorrectly using flush_work() when flush_work_sync() is necessary\n  is an easy error to make and can lead to bugs which are difficult to\n  reproduce.\n\n* Similar problems exist for flush_delayed_work[_sync]().\n\nOther than the cross-cpu access concern, there\u0027s no benefit in\nallowing parallel execution and it\u0027s plain silly to have this level of\ncontortion for workqueue which is widely used from core code to\nextremely obscure drivers.\n\nThis patch makes all workqueues non-reentrant.  If a work item is\nexecuting on a different CPU when queueing is requested, it is always\nqueued to that CPU.  This guarantees that any given work item can be\nexecuting on one CPU at maximum and if a work item is queued and\nexecuting, both are on the same CPU.\n\nThe only behavior change which may affect workqueue users negatively\nis that non-reentrancy overrides the affinity specified by\nqueue_work_on().  On a reentrant workqueue, the affinity specified by\nqueue_work_on() is always followed.  Now, if the work item is\nexecuting on one of the CPUs, the work item will be queued there\nregardless of the requested affinity.  I\u0027ve reviewed all workqueue\nusers which request explicit affinity, and, fortunately, none seems to\nbe crazy enough to exploit parallel execution of the same work item.\n\nThis adds an additional busy_hash lookup if the work item was\npreviously queued on a different CPU.  This shouldn\u0027t be noticeable\nunder any sane workload.  Work item queueing isn\u0027t a very\nhigh-frequency operation and they don\u0027t jump across CPUs all the time.\nIn a micro benchmark to exaggerate this difference - measuring the\ntime it takes for two work items to repeatedly jump between two CPUs a\nnumber (10M) of times with busy_hash table densely populated, the\ndifference was around 3%.\n\nWhile the overhead is measureable, it is only visible in pathological\ncases and the difference isn\u0027t huge.  This change brings much needed\nsanity to workqueue and makes its behavior consistent with timer.  I\nthink this is the right tradeoff to make.\n\nThis enables significant simplification of workqueue API.\nSimplification patches will follow.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "044c782ce3a901fbd17cbe701c592f582381174d",
      "tree": "d876983bb2930219181f09b900ce42c61782e4e5",
      "parents": [
        "7635d2fd7f0fa63b6ec03050614c314d7139f14a"
      ],
      "author": {
        "name": "Valentin Ilie",
        "email": "valentin.ilie@gmail.com",
        "time": "Sun Aug 19 00:52:42 2012 +0300"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 20 13:37:07 2012 -0700"
      },
      "message": "workqueue: fix checkpatch issues\n\nFixed some checkpatch warnings.\n\ntj: adapted to wq/for-3.7 and massaged pr_xxx() format strings a bit.\n\nSigned-off-by: Valentin Ilie \u003cvalentin.ilie@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nLKML-Reference: \u003c1345326762-21747-1-git-send-email-valentin.ilie@gmail.com\u003e\n"
    },
    {
      "commit": "7635d2fd7f0fa63b6ec03050614c314d7139f14a",
      "tree": "8d8d0387e6f791ed67ad5d23dfe0fb93a1615337",
      "parents": [
        "e2b6a6d570f070aa90ac00d2d10b1488512f8520"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed Aug 15 23:25:41 2012 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 16 14:21:16 2012 -0700"
      },
      "message": "workqueue: use system_highpri_wq for unbind_work\n\nTo speed cpu down processing up, use system_highpri_wq.\nAs scheduling priority of workers on it is higher than system_wq and\nit is not contended by other normal works on this cpu, work on it\nis processed faster than system_wq.\n\ntj: CPU up/downs care quite a bit about latency these days.  This\n    shouldn\u0027t hurt anything and makes sense.\n\nSigned-off-by: Joonsoo Kim \u003cjs1304@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "e2b6a6d570f070aa90ac00d2d10b1488512f8520",
      "tree": "4f61d435e55f764b1bd990540d533fd68d9fbaa2",
      "parents": [
        "1aabe902ca3638d862bf0dad5a697d3a8e046b0a"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed Aug 15 23:25:40 2012 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 16 14:21:15 2012 -0700"
      },
      "message": "workqueue: use system_highpri_wq for highpri workers in rebind_workers()\n\nIn rebind_workers(), we do inserting a work to rebind to cpu for busy workers.\nCurrently, in this case, we use only system_wq. This makes a possible\nerror situation as there is mismatch between cwq-\u003epool and worker-\u003epool.\n\nTo prevent this, we should use system_highpri_wq for highpri worker\nto match theses. This implements it.\n\ntj: Rephrased comment a bit.\n\nSigned-off-by: Joonsoo Kim \u003cjs1304@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "1aabe902ca3638d862bf0dad5a697d3a8e046b0a",
      "tree": "9cd5e0db2c42e83de8dfadb38e22b57d8bd24c4b",
      "parents": [
        "e42986de481238204f6e0b0f4434da428895c20b"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed Aug 15 23:25:39 2012 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 16 14:21:15 2012 -0700"
      },
      "message": "workqueue: introduce system_highpri_wq\n\nCommit 3270476a6c0ce322354df8679652f060d66526dc (\u0027workqueue: reimplement\nWQ_HIGHPRI using a separate worker_pool\u0027) introduce separate worker pool\nfor HIGHPRI. When we handle busyworkers for gcwq, it can be normal worker\nor highpri worker. But, we don\u0027t consider this difference in rebind_workers(),\nwe use just system_wq for highpri worker. It makes mismatch between\ncwq-\u003epool and worker-\u003epool.\n\nIt doesn\u0027t make error in current implementation, but possible in the future.\nNow, we introduce system_highpri_wq to use proper cwq for highpri workers\nin rebind_workers(). Following patch fix this issue properly.\n\ntj: Even apart from rebinding, having system_highpri_wq generally\n    makes sense.\n\nSigned-off-by: Joonsoo Kim \u003cjs1304@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "e42986de481238204f6e0b0f4434da428895c20b",
      "tree": "613150adf76500507ca69d59d5448fa05affbc98",
      "parents": [
        "b75cac9368fa91636e17d0f7950b35d837154e14"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed Aug 15 23:25:38 2012 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 16 14:21:15 2012 -0700"
      },
      "message": "workqueue: change value of lcpu in __queue_delayed_work_on()\n\nWe assign cpu id into work struct\u0027s data field in __queue_delayed_work_on().\nIn current implementation, when work is come in first time,\ncurrent running cpu id is assigned.\nIf we do __queue_delayed_work_on() with CPU A on CPU B,\n__queue_work() invoked in delayed_work_timer_fn() go into\nthe following sub-optimal path in case of WQ_NON_REENTRANT.\n\n\tgcwq \u003d get_gcwq(cpu);\n\tif (wq-\u003eflags \u0026 WQ_NON_REENTRANT \u0026\u0026\n\t\t(last_gcwq \u003d get_work_gcwq(work)) \u0026\u0026 last_gcwq !\u003d gcwq) {\n\nChange lcpu to @cpu and rechange lcpu to local cpu if lcpu is WORK_CPU_UNBOUND.\nIt is sufficient to prevent to go into sub-optimal path.\n\ntj: Slightly rephrased the comment.\n\nSigned-off-by: Joonsoo Kim \u003cjs1304@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "b75cac9368fa91636e17d0f7950b35d837154e14",
      "tree": "7f5fcdb6f57da351732c46d67b5d9d001fa54a0b",
      "parents": [
        "330dad5b9c9555632578c00e94e85c122561c5c7"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed Aug 15 23:25:37 2012 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 16 14:21:15 2012 -0700"
      },
      "message": "workqueue: correct req_cpu in trace_workqueue_queue_work()\n\nWhen we do tracing workqueue_queue_work(), it records requested cpu.\nBut, if !(@wq-\u003eflag \u0026 WQ_UNBOUND) and @cpu is WORK_CPU_UNBOUND,\nrequested cpu is changed as local cpu.\nIn case of @wq-\u003eflag \u0026 WQ_UNBOUND, above change is not occured,\ntherefore it is reasonable to correct it.\n\nUse temporary local variable for storing requested cpu.\n\nSigned-off-by: Joonsoo Kim \u003cjs1304@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "330dad5b9c9555632578c00e94e85c122561c5c7",
      "tree": "bc26f30c0d67f3a80cf5a7c97caaec64f88d9c6a",
      "parents": [
        "23657bb192f14b789e4c478def8f11ecc95b4f6c"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed Aug 15 23:25:36 2012 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Aug 16 14:21:15 2012 -0700"
      },
      "message": "workqueue: use enum value to set array size of pools in gcwq\n\nCommit 3270476a6c0ce322354df8679652f060d66526dc (\u0027workqueue: reimplement\nWQ_HIGHPRI using a separate worker_pool\u0027) introduce separate worker_pool\nfor HIGHPRI. Although there is NR_WORKER_POOLS enum value which represent\nsize of pools, definition of worker_pool in gcwq doesn\u0027t use it.\nUsing it makes code robust and prevent future mistakes.\nSo change code to use this enum value.\n\nSigned-off-by: Joonsoo Kim \u003cjs1304@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "23657bb192f14b789e4c478def8f11ecc95b4f6c",
      "tree": "53d92c542c219d60ccef2ada045235f5e7076863",
      "parents": [
        "1265057fa02c7bed3b6d9ddc8a2048065a370364"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 13 17:08:19 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 13 17:08:19 2012 -0700"
      },
      "message": "workqueue: add missing wmb() in clear_work_data()\n\nAny operation which clears PENDING should be preceded by a wmb to\nguarantee that the next PENDING owner sees all the changes made before\nPENDING release.\n\nThere are only two places where PENDING is cleared -\nset_work_cpu_and_clear_pending() and clear_work_data().  The caller of\nthe former already does smp_wmb() but the latter doesn\u0027t have any.\n\nMove the wmb above set_work_cpu_and_clear_pending() into it and add\none to clear_work_data().\n\nThere hasn\u0027t been any report related to this issue, and, given how\nclear_work_data() is used, it is extremely unlikely to have caused any\nactual problems on any architecture.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\n"
    },
    {
      "commit": "1265057fa02c7bed3b6d9ddc8a2048065a370364",
      "tree": "b10e631ca6157103fcc71188e972b06e18c3570f",
      "parents": [
        "41f63c5359d14ca995172b8f6eaffd93f60fec54"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Aug 08 09:38:42 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Aug 13 16:27:55 2012 -0700"
      },
      "message": "workqueue: fix CPU binding of flush_delayed_work[_sync]()\n\ndelayed_work encodes the workqueue to use and the last CPU in\ndelayed_work-\u003ework.data while it\u0027s on timer.  The target CPU is\nimplicitly recorded as the CPU the timer is queued on and\ndelayed_work_timer_fn() queues delayed_work-\u003ework to the CPU it is\nrunning on.\n\nUnfortunately, this leaves flush_delayed_work[_sync]() no way to find\nout which CPU the delayed_work was queued for when they try to\nre-queue after killing the timer.  Currently, it chooses the local CPU\nflush is running on.  This can unexpectedly move a delayed_work queued\non a specific CPU to another CPU and lead to subtle errors.\n\nThere isn\u0027t much point in trying to save several bytes in struct\ndelayed_work, which is already close to a hundred bytes on 64bit with\nall debug options turned off.  This patch adds delayed_work-\u003ecpu to\nremember the CPU it\u0027s queued for.\n\nNote that if the timer is migrated during CPU down, the work item\ncould be queued to the downed global_cwq after this change.  As a\ndetached global_cwq behaves like an unbound one, this doesn\u0027t change\nmuch for the delayed_work.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\n"
    },
    {
      "commit": "8376fe22c7e79c7e90857d39f82aeae6cad6c4b8",
      "tree": "3a77fda11324a25abfe1ffe3ea0eba28a4fac03f",
      "parents": [
        "bbb68dfaba73e8338fe0f1dc711cc1d261daec87"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:47 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:47 2012 -0700"
      },
      "message": "workqueue: implement mod_delayed_work[_on]()\n\nWorkqueue was lacking a mechanism to modify the timeout of an already\npending delayed_work.  delayed_work users have been working around\nthis using several methods - using an explicit timer + work item,\nmessing directly with delayed_work-\u003etimer, and canceling before\nre-queueing, all of which are error-prone and/or ugly.\n\nThis patch implements mod_delayed_work[_on]() which behaves similarly\nto mod_timer() - if the delayed_work is idle, it\u0027s queued with the\ngiven delay; otherwise, its timeout is modified to the new value.\nZero @delay guarantees immediate execution.\n\nv2: Updated to reflect try_to_grab_pending() changes.  Now safe to be\n    called from bh context.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\n"
    },
    {
      "commit": "bbb68dfaba73e8338fe0f1dc711cc1d261daec87",
      "tree": "8cafa2786991ea8dc2b8da5005b2c1d92aa204ac",
      "parents": [
        "36e227d242f9ec7cb4a8e968561b3b26e3d8b5d1"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "message": "workqueue: mark a work item being canceled as such\n\nThere can be two reasons try_to_grab_pending() can fail with -EAGAIN.\nOne is when someone else is queueing or deqeueing the work item.  With\nthe previous patches, it is guaranteed that PENDING and queued state\nwill soon agree making it safe to busy-retry in this case.\n\nThe other is if multiple __cancel_work_timer() invocations are racing\none another.  __cancel_work_timer() grabs PENDING and then waits for\nrunning instances of the target work item on all CPUs while holding\nPENDING and !queued.  try_to_grab_pending() invoked from another task\nwill keep returning -EAGAIN while the current owner is waiting.\n\nNot distinguishing the two cases is okay because __cancel_work_timer()\nis the only user of try_to_grab_pending() and it invokes\nwait_on_work() whenever grabbing fails.  For the first case, busy\nlooping should be fine but wait_on_work() doesn\u0027t cause any critical\nproblem.  For the latter case, the new contender usually waits for the\nsame condition as the current owner, so no unnecessarily extended\nbusy-looping happens.  Combined, these make __cancel_work_timer()\ntechnically correct even without irq protection while grabbing PENDING\nor distinguishing the two different cases.\n\nWhile the current code is technically correct, not distinguishing the\ntwo cases makes it difficult to use try_to_grab_pending() for other\npurposes than canceling because it\u0027s impossible to tell whether it\u0027s\nsafe to busy-retry grabbing.\n\nThis patch adds a mechanism to mark a work item being canceled.\ntry_to_grab_pending() now disables irq on success and returns -EAGAIN\nto indicate that grabbing failed but PENDING and queued states are\ngonna agree soon and it\u0027s safe to busy-loop.  It returns -ENOENT if\nthe work item is being canceled and it may stay PENDING \u0026\u0026 !queued for\narbitrary amount of time.\n\n__cancel_work_timer() is modified to mark the work canceling with\nWORK_OFFQ_CANCELING after grabbing PENDING, thus making\ntry_to_grab_pending() fail with -ENOENT instead of -EAGAIN.  Also, it\ninvokes wait_on_work() iff grabbing failed with -ENOENT.  This isn\u0027t\nnecessary for correctness but makes it consistent with other future\nusers of try_to_grab_pending().\n\nv2: try_to_grab_pending() was testing preempt_count() to ensure that\n    the caller has disabled preemption.  This triggers spuriously if\n    !CONFIG_PREEMPT_COUNT.  Use preemptible() instead.  Reported by\n    Fengguang Wu.\n\nv3: Updated so that try_to_grab_pending() disables irq on success\n    rather than requiring preemption disabled by the caller.  This\n    makes busy-looping easier and will allow try_to_grap_pending() to\n    be used from bh/irq contexts.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\n"
    },
    {
      "commit": "36e227d242f9ec7cb4a8e968561b3b26e3d8b5d1",
      "tree": "a35f1711123a22e90e6c06217cead66933404a3d",
      "parents": [
        "7beb2edf44b4dea820c733046ad7666d092bb4b6"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "message": "workqueue: reorganize try_to_grab_pending() and __cancel_timer_work()\n\n* Use bool @is_dwork instead of @timer and let try_to_grab_pending()\n  use to_delayed_work() to determine the delayed_work address.\n\n* Move timer handling from __cancel_work_timer() to\n  try_to_grab_pending().\n\n* Make try_to_grab_pending() use -EAGAIN instead of -1 for\n  busy-looping and drop the ret local variable.\n\n* Add proper function comment to try_to_grab_pending().\n\nThis makes the code a bit easier to understand and will ease further\nchanges.  This patch doesn\u0027t make any functional change.\n\nv2: Use @is_dwork instead of @timer.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "7beb2edf44b4dea820c733046ad7666d092bb4b6",
      "tree": "ef264acb53bf3e0c2349792bceb6a19806d8867c",
      "parents": [
        "b5490077274482efde57a50b060b99bc839acd45"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "message": "workqueue: factor out __queue_delayed_work() from queue_delayed_work_on()\n\nThis is to prepare for mod_delayed_work[_on]() and doesn\u0027t cause any\nfunctional difference.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "b5490077274482efde57a50b060b99bc839acd45",
      "tree": "dae1b67fa7b1c18d116fe97765bad1e52786e7aa",
      "parents": [
        "bf4ede014ea886b71ef71368738da35b316cb7c0"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "message": "workqueue: introduce WORK_OFFQ_FLAG_*\n\nLow WORK_STRUCT_FLAG_BITS bits of work_struct-\u003edata contain\nWORK_STRUCT_FLAG_* and flush color.  If the work item is queued, the\nrest point to the cpu_workqueue with WORK_STRUCT_CWQ set; otherwise,\nWORK_STRUCT_CWQ is clear and the bits contain the last CPU number -\neither a real CPU number or one of WORK_CPU_*.\n\nScheduled addition of mod_delayed_work[_on]() requires an additional\nflag, which is used only while a work item is off queue.  There are\nmore than enough bits to represent off-queue CPU number on both 32 and\n64bits.  This patch introduces WORK_OFFQ_FLAG_* which occupy the lower\npart of the @work-\u003edata high bits while off queue.  This patch doesn\u0027t\ndefine any actual OFFQ flag yet.\n\nOff-queue CPU number is now shifted by WORK_OFFQ_CPU_SHIFT, which adds\nthe number of bits used by OFFQ flags to WORK_STRUCT_FLAG_SHIFT, to\nmake room for OFFQ flags.\n\nTo avoid shift width warning with large WORK_OFFQ_FLAG_BITS, ulong\ncast is added to WORK_STRUCT_NO_CPU and, just in case, BUILD_BUG_ON()\nto check that there are enough bits to accomodate off-queue CPU number\nis added.\n\nThis patch doesn\u0027t make any functional difference.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "bf4ede014ea886b71ef71368738da35b316cb7c0",
      "tree": "9ae8f14883406241c54e5d0febc3c27258f4b45a",
      "parents": [
        "715f1300802e6eaefa85f6cfc70ae99af3d5d497"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "message": "workqueue: move try_to_grab_pending() upwards\n\ntry_to_grab_pending() will be used by to-be-implemented\nmod_delayed_work[_on]().  Move try_to_grab_pending() and related\nfunctions above queueing functions.\n\nThis patch only moves functions around.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "715f1300802e6eaefa85f6cfc70ae99af3d5d497",
      "tree": "1348231ae08bcb722e860aebe2e46a0565a86fd7",
      "parents": [
        "57469821fd5c61f25f783827d7334063cff67d65"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:46 2012 -0700"
      },
      "message": "workqueue: fix zero @delay handling of queue_delayed_work_on()\n\nIf @delay is zero and the dealyed_work is idle, queue_delayed_work()\nqueues it for immediate execution; however, queue_delayed_work_on()\nlacks this logic and always goes through timer regardless of @delay.\n\nThis patch moves 0 @delay handling logic from queue_delayed_work() to\nqueue_delayed_work_on() so that both functions behave the same.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "57469821fd5c61f25f783827d7334063cff67d65",
      "tree": "e77ead09d823125bc4dc9a9cd49864f9340ad363",
      "parents": [
        "d8e794dfd51c368ed3f686b7f4172830b60ae47b"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "message": "workqueue: unify local CPU queueing handling\n\nQueueing functions have been using different methods to determine the\nlocal CPU.\n\n* queue_work() superflously uses get/put_cpu() to acquire and hold the\n  local CPU across queue_work_on().\n\n* delayed_work_timer_fn() uses smp_processor_id().\n\n* queue_delayed_work() calls queue_delayed_work_on() with -1 @cpu\n  which is interpreted as the local CPU.\n\n* flush_delayed_work[_sync]() were using raw_smp_processor_id().\n\n* __queue_work() interprets %WORK_CPU_UNBOUND as local CPU if the\n  target workqueue is bound one but nobody uses this.\n\nThis patch converts all functions to uniformly use %WORK_CPU_UNBOUND\nto indicate local CPU and use the local binding feature of\n__queue_work().  unlikely() is dropped from %WORK_CPU_UNBOUND handling\nin __queue_work().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "d8e794dfd51c368ed3f686b7f4172830b60ae47b",
      "tree": "72e930ab0a14bf50fa1dc6802722483247b72806",
      "parents": [
        "8930caba3dbdd8b86dd6934a5920bf61b53a931e"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "message": "workqueue: set delayed_work-\u003etimer function on initialization\n\ndelayed_work-\u003etimer.function is currently initialized during\nqueue_delayed_work_on().  Export delayed_work_timer_fn() and set\ndelayed_work timer function during delayed_work initialization\ntogether with other fields.\n\nThis ensures the timer function is always valid on an initialized\ndelayed_work.  This is to help mod_delayed_work() implementation.\n\nTo detect delayed_work users which diddle with the internal timer,\ntrigger WARN if timer function doesn\u0027t match on queue.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8930caba3dbdd8b86dd6934a5920bf61b53a931e",
      "tree": "1ef91c823238ffe3e26af1d1d48678f299185058",
      "parents": [
        "959d1af8cffc8fd38ed53e8be1cf4ab8782f9c00"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "message": "workqueue: disable irq while manipulating PENDING\n\nQueueing operations use WORK_STRUCT_PENDING_BIT to synchronize access\nto the target work item.  They first try to claim the bit and proceed\nwith queueing only after that succeeds and there\u0027s a window between\nPENDING being set and the actual queueing where the task can be\ninterrupted or preempted.\n\nThere\u0027s also a similar window in process_one_work() when clearing\nPENDING.  A work item is dequeued, gcwq-\u003elock is released and then\nPENDING is cleared and the worker might get interrupted or preempted\nbetween releasing gcwq-\u003elock and clearing PENDING.\n\ncancel[_delayed]_work_sync() tries to claim or steal PENDING.  The\nfunction assumes that a work item with PENDING is either queued or in\nthe process of being [de]queued.  In the latter case, it busy-loops\nuntil either the work item loses PENDING or is queued.  If canceling\ncoincides with the above described interrupts or preemptions, the\ncanceling task will busy-loop while the queueing or executing task is\npreempted.\n\nThis patch keeps irq disabled across claiming PENDING and actual\nqueueing and moves PENDING clearing in process_one_work() inside\ngcwq-\u003elock so that busy looping from PENDING \u0026\u0026 !queued doesn\u0027t wait\nfor interrupted/preempted tasks.  Note that, in process_one_work(),\nsetting last CPU and clearing PENDING got merged into single\noperation.\n\nThis removes possible long busy-loops and will allow using\ntry_to_grab_pending() from bh and irq contexts.\n\nv2: __queue_work() was testing preempt_count() to ensure that the\n    caller has disabled preemption.  This triggers spuriously if\n    !CONFIG_PREEMPT_COUNT.  Use preemptible() instead.  Reported by\n    Fengguang Wu.\n\nv3: Disable irq instead of preemption.  IRQ will be disabled while\n    grabbing gcwq-\u003elock later anyway and this allows using\n    try_to_grab_pending() from bh and irq contexts.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\n"
    },
    {
      "commit": "959d1af8cffc8fd38ed53e8be1cf4ab8782f9c00",
      "tree": "04ca9a7c88fe42f21fa4a6a209a2c16236615f45",
      "parents": [
        "d4283e9378619c14dc3826a6b0527eb5d967ffde"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:45 2012 -0700"
      },
      "message": "workqueue: add missing smp_wmb() in process_one_work()\n\nWORK_STRUCT_PENDING is used to claim ownership of a work item and\nprocess_one_work() releases it before starting execution.  When\nsomeone else grabs PENDING, all pre-release updates to the work item\nshould be visible and all updates made by the new owner should happen\nafterwards.\n\nGrabbing PENDING uses test_and_set_bit() and thus has a full barrier;\nhowever, clearing doesn\u0027t have a matching wmb.  Given the preceding\nspin_unlock and use of clear_bit, I don\u0027t believe this can be a\nproblem on an actual machine and there hasn\u0027t been any related report\nbut it still is theretically possible for clear_pending to permeate\nupwards and happen before work-\u003eentry update.\n\nAdd an explicit smp_wmb() before work_clear_pending().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: stable@vger.kernel.org\n"
    },
    {
      "commit": "d4283e9378619c14dc3826a6b0527eb5d967ffde",
      "tree": "1b1e401e51021c90407fae58e000c183a0e6c0e2",
      "parents": [
        "0a13c00e9d4502b8e3fd9260ce781758ff2c3970"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:44 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:44 2012 -0700"
      },
      "message": "workqueue: make queueing functions return bool\n\nAll queueing functions return 1 on success, 0 if the work item was\nalready pending.  Update them to return bool instead.  This signifies\nbetter that they don\u0027t return 0 / -errno.\n\nThis is cleanup and doesn\u0027t cause any functional difference.\n\nWhile at it, fix comment opening for schedule_work_on().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "0a13c00e9d4502b8e3fd9260ce781758ff2c3970",
      "tree": "4233ef42fad89b4c42e00d8fed76112ce28390ba",
      "parents": [
        "0d7614f09c1ebdbaa1599a5aba7593f147bf96ee"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:44 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Aug 03 10:30:44 2012 -0700"
      },
      "message": "workqueue: reorder queueing functions so that _on() variants are on top\n\nCurrently, queue/schedule[_delayed]_work_on() are located below the\ncounterpart without the _on postifx even though the latter is usually\nimplemented using the former.  Swap them.\n\nThis is cleanup and doesn\u0027t cause any functional difference.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "6fec10a1a5866dda3cd6a825a521fc7c2f226ba5",
      "tree": "f45c465a2d5f04e5052324efd114ac07cd668a41",
      "parents": [
        "46f3d976213452350f9d10b0c2780c2681f7075b"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Sun Jul 22 10:16:34 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Sun Jul 22 10:16:34 2012 -0700"
      },
      "message": "workqueue: fix spurious CPU locality WARN from process_one_work()\n\n25511a4776 \"workqueue: reimplement CPU online rebinding to handle idle\nworkers\" added CPU locality sanity check in process_one_work().  It\ntriggers if a worker is executing on a different CPU without UNBOUND\nor REBIND set.\n\nThis works for all normal workers but rescuers can trigger this\nspuriously when they\u0027re serving the unbound or a disassociated\nglobal_cwq - rescuers don\u0027t have either flag set and thus its\ngcwq-\u003ecpu can be a different value including %WORK_CPU_UNBOUND.\n\nFix it by additionally testing %GCWQ_DISASSOCIATED.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: \"Paul E. McKenney\" \u003cpaulmck@linux.vnet.ibm.com\u003e\nLKML-Refence: \u003c20120721213656.GA7783@linux.vnet.ibm.com\u003e\n"
    },
    {
      "commit": "8db25e7891a47e03db6f04344a9c92be16e391bb",
      "tree": "e093119c71e655b54b159fed76b654a437b1ff30",
      "parents": [
        "628c78e7ea19d5b70d2b6a59030362168cdbe1ad"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:28 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:28 2012 -0700"
      },
      "message": "workqueue: simplify CPU hotplug code\n\nWith trustee gone, CPU hotplug code can be simplified.\n\n* gcwq_claim/release_management() now grab and release gcwq lock too\n  respectively and gained _and_lock and _and_unlock postfixes.\n\n* All CPU hotplug logic was implemented in workqueue_cpu_callback()\n  which was called by workqueue_cpu_up/down_callback() for the correct\n  priority.  This was because up and down paths shared a lot of logic,\n  which is no longer true.  Remove workqueue_cpu_callback() and move\n  all hotplug logic into the two actual callbacks.\n\nThis patch doesn\u0027t make any functional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "628c78e7ea19d5b70d2b6a59030362168cdbe1ad",
      "tree": "7867a9f82aae3d31c40356f32ae24223ae0ddf0c",
      "parents": [
        "3ce63377305b694f53e7dd0c72907591c5344224"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "message": "workqueue: remove CPU offline trustee\n\nWith the previous changes, a disassociated global_cwq now can run as\nan unbound one on its own - it can create workers as necessary to\ndrain remaining works after the CPU has been brought down and manage\nthe number of workers using the usual idle timer mechanism making\ntrustee completely redundant except for the actual unbinding\noperation.\n\nThis patch removes the trustee and let a disassociated global_cwq\nmanage itself.  Unbinding is moved to a work item (for CPU affinity)\nwhich is scheduled and flushed from CPU_DONW_PREPARE.\n\nThis patch moves nr_running clearing outside gcwq and manager locks to\nsimplify the code.  As nr_running is unused at the point, this is\nsafe.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "3ce63377305b694f53e7dd0c72907591c5344224",
      "tree": "bee43bee96418ebdff5f7ad678584628fd86c52e",
      "parents": [
        "25511a477657884d2164f338341fa89652610507"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "message": "workqueue: don\u0027t butcher idle workers on an offline CPU\n\nCurrently, during CPU offlining, after all pending work items are\ndrained, the trustee butchers all workers.  Also, on CPU onlining\nfailure, workqueue_cpu_callback() ensures that the first idle worker\nis destroyed.  Combined, these guarantee that an offline CPU doesn\u0027t\nhave any worker for it once all the lingering work items are finished.\n\nThis guarantee isn\u0027t really necessary and makes CPU on/offlining more\nexpensive than needs to be, especially for platforms which use CPU\nhotplug for powersaving.\n\nThis patch lets offline CPUs removes idle worker butchering from the\ntrustee and let a CPU which failed onlining keep the created first\nworker.  The first worker is created if the CPU doesn\u0027t have any\nduring CPU_DOWN_PREPARE and started right away.  If onlining succeeds,\nthe rebind_workers() call in CPU_ONLINE will rebind it like any other\nworkers.  If onlining fails, the worker is left alone till the next\ntry.\n\nThis makes CPU hotplugs cheaper by allowing global_cwqs to keep\nworkers across them and simplifies code.\n\nNote that trustee doesn\u0027t re-arm idle timer when it\u0027s done and thus\nthe disassociated global_cwq will keep all workers until it comes back\nonline.  This will be improved by further patches.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "25511a477657884d2164f338341fa89652610507",
      "tree": "dbea343f762f154c28b6db423f0220f090d94d60",
      "parents": [
        "bc2ae0f5bb2f39e6db06a62f9d353e4601a332a1"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "message": "workqueue: reimplement CPU online rebinding to handle idle workers\n\nCurrently, if there are left workers when a CPU is being brough back\nonline, the trustee kills all idle workers and scheduled rebind_work\nso that they re-bind to the CPU after the currently executing work is\nfinished.  This works for busy workers because concurrency management\ndoesn\u0027t try to wake up them from scheduler callbacks, which require\nthe target task to be on the local run queue.  The busy worker bumps\nconcurrency counter appropriately as it clears WORKER_UNBOUND from the\nrebind work item and it\u0027s bound to the CPU before returning to the\nidle state.\n\nTo reduce CPU on/offlining overhead (as many embedded systems use it\nfor powersaving) and simplify the code path, workqueue is planned to\nbe modified to retain idle workers across CPU on/offlining.  This\npatch reimplements CPU online rebinding such that it can also handle\nidle workers.\n\nAs noted earlier, due to the local wakeup requirement, rebinding idle\nworkers is tricky.  All idle workers must be re-bound before scheduler\ncallbacks are enabled.  This is achieved by interlocking idle\nre-binding.  Idle workers are requested to re-bind and then hold until\nall idle re-binding is complete so that no bound worker starts\nexecuting work item.  Only after all idle workers are re-bound and\nparked, CPU_ONLINE proceeds to release them and queue rebind work item\nto busy workers thus guaranteeing scheduler callbacks aren\u0027t invoked\nuntil all idle workers are ready.\n\nworker_rebind_fn() is renamed to busy_worker_rebind_fn() and\nidle_worker_rebind() for idle workers is added.  Rebinding logic is\nmoved to rebind_workers() and now called from CPU_ONLINE after\nflushing trustee.  While at it, add CPU sanity check in\nworker_thread().\n\nNote that now a worker may become idle or the manager between trustee\nrelease and rebinding during CPU_ONLINE.  As the previous patch\nupdated create_worker() so that it can be used by regular manager\nwhile unbound and this patch implements idle re-binding, this is safe.\n\nThis prepares for removal of trustee and keeping idle workers across\nCPU hotplugs.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "bc2ae0f5bb2f39e6db06a62f9d353e4601a332a1",
      "tree": "3f1aa1f72566ac67234799fdd811ba63297de33c",
      "parents": [
        "6037315269d62bf967286ae2670fdd6b6acedab9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "message": "workqueue: drop @bind from create_worker()\n\nCurrently, create_worker()\u0027s callers are responsible for deciding\nwhether the newly created worker should be bound to the associated CPU\nand create_worker() sets WORKER_UNBOUND only for the workers for the\nunbound global_cwq.  Creation during normal operation is always via\nmaybe_create_worker() and @bind is true.  For workers created during\nhotplug, @bind is false.\n\nNormal operation path is planned to be used even while the CPU is\ngoing through hotplug operations or offline and this static decision\nwon\u0027t work.\n\nDrop @bind from create_worker() and decide whether to bind by looking\nat GCWQ_DISASSOCIATED.  create_worker() will also set WORKER_UNBOUND\nautmatically if disassociated.  To avoid flipping GCWQ_DISASSOCIATED\nwhile create_worker() is in progress, the flag is now allowed to be\nchanged only while holding all manager_mutexes on the global_cwq.\n\nThis requires that GCWQ_DISASSOCIATED is not cleared behind trustee\u0027s\nback.  CPU_ONLINE no longer clears DISASSOCIATED before flushing\ntrustee, which clears DISASSOCIATED before rebinding remaining workers\nif asked to release.  For cases where trustee isn\u0027t around, CPU_ONLINE\nclears DISASSOCIATED after flushing trustee.  Also, now, first_idle\nhas UNBOUND set on creation which is explicitly cleared by CPU_ONLINE\nwhile binding it.  These convolutions will soon be removed by further\nsimplification of CPU hotplug path.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "6037315269d62bf967286ae2670fdd6b6acedab9",
      "tree": "c476298b57c0a33aa7fe3c898d62ce17eb11d2ad",
      "parents": [
        "403c821d452c03be4ced571ac91339a9d3631b17"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "message": "workqueue: use mutex for global_cwq manager exclusion\n\nPOOL_MANAGING_WORKERS is used to ensure that at most one worker takes\nthe manager role at any given time on a given global_cwq.  Trustee\nlater hitched on it to assume manager adding blocking wait for the\nbit.  As trustee already needed a custom wait mechanism, waiting for\nMANAGING_WORKERS was rolled into the same mechanism.\n\nTrustee is scheduled to be removed.  This patch separates out\nMANAGING_WORKERS wait into per-pool mutex.  Workers use\nmutex_trylock() to test for manager role and trustee uses mutex_lock()\nto claim manager roles.\n\ngcwq_claim/release_management() helpers are added to grab and release\nmanager roles of all pools on a global_cwq.  gcwq_claim_management()\nalways grabs pool manager mutexes in ascending pool index order and\nuses pool index as lockdep subclass.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "403c821d452c03be4ced571ac91339a9d3631b17",
      "tree": "022cf4ff47b9652ca550498dc896672c1cec8d05",
      "parents": [
        "f2d5a0ee06c1813f985bb9386f3ccc0d0315720f"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:27 2012 -0700"
      },
      "message": "workqueue: ROGUE workers are UNBOUND workers\n\nCurrently, WORKER_UNBOUND is used to mark workers for the unbound\nglobal_cwq and WORKER_ROGUE is used to mark workers for disassociated\nper-cpu global_cwqs.  Both are used to make the marked worker skip\nconcurrency management and the only place they make any difference is\nin worker_enter_idle() where WORKER_ROGUE is used to skip scheduling\nidle timer, which can easily be replaced with trustee state testing.\n\nThis patch replaces WORKER_ROGUE with WORKER_UNBOUND and drops\nWORKER_ROGUE.  This is to prepare for removing trustee and handling\ndisassociated global_cwqs as unbound.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "f2d5a0ee06c1813f985bb9386f3ccc0d0315720f",
      "tree": "4207975fe000f95931b0c6876657db5b13f92b73",
      "parents": [
        "6575820221f7a4dd6eadecf7bf83cdd154335eda"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:26 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:26 2012 -0700"
      },
      "message": "workqueue: drop CPU_DYING notifier operation\n\nWorkqueue used CPU_DYING notification to mark GCWQ_DISASSOCIATED.\nThis was necessary because workqueue\u0027s CPU_DOWN_PREPARE happened\nbefore other DOWN_PREPARE notifiers and workqueue needed to stay\nassociated across the rest of DOWN_PREPARE.\n\nAfter the previous patch, workqueue\u0027s DOWN_PREPARE happens after\nothers and can set GCWQ_DISASSOCIATED directly.  Drop CPU_DYING and\nlet the trustee set GCWQ_DISASSOCIATED after disabling concurrency\nmanagement.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "6575820221f7a4dd6eadecf7bf83cdd154335eda",
      "tree": "2f9061b4eb1b6cf5a4b70acc45cb46a1a287066a",
      "parents": [
        "3270476a6c0ce322354df8679652f060d66526dc"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:26 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jul 17 12:39:26 2012 -0700"
      },
      "message": "workqueue: perform cpu down operations from low priority cpu_notifier()\n\nCurrently, all workqueue cpu hotplug operations run off\nCPU_PRI_WORKQUEUE which is higher than normal notifiers.  This is to\nensure that workqueue is up and running while bringing up a CPU before\nother notifiers try to use workqueue on the CPU.\n\nPer-cpu workqueues are supposed to remain working and bound to the CPU\nfor normal CPU_DOWN_PREPARE notifiers.  This holds mostly true even\nwith workqueue offlining running with higher priority because\nworkqueue CPU_DOWN_PREPARE only creates a bound trustee thread which\nruns the per-cpu workqueue without concurrency management without\nexplicitly detaching the existing workers.\n\nHowever, if the trustee needs to create new workers, it creates\nunbound workers which may wander off to other CPUs while\nCPU_DOWN_PREPARE notifiers are in progress.  Furthermore, if the CPU\ndown is cancelled, the per-CPU workqueue may end up with workers which\naren\u0027t bound to the CPU.\n\nWhile reliably reproducible with a convoluted artificial test-case\ninvolving scheduling and flushing CPU burning work items from CPU down\nnotifiers, this isn\u0027t very likely to happen in the wild, and, even\nwhen it happens, the effects are likely to be hidden by the following\nsuccessful CPU down.\n\nFix it by using different priorities for up and down notifiers - high\npriority for up operations and low priority for down operations.\n\nWorkqueue cpu hotplug operations will soon go through further cleanup.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: stable@vger.kernel.org\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "3270476a6c0ce322354df8679652f060d66526dc",
      "tree": "db58846beb7c5e1c1b50b7e2f1c2538320408c26",
      "parents": [
        "4ce62e9e30cacc26885cab133ad1de358dd79f21"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jul 13 22:16:45 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jul 13 22:24:45 2012 -0700"
      },
      "message": "workqueue: reimplement WQ_HIGHPRI using a separate worker_pool\n\nWQ_HIGHPRI was implemented by queueing highpri work items at the head\nof the global worklist.  Other than queueing at the head, they weren\u0027t\nhandled differently; unfortunately, this could lead to execution\nlatency of a few seconds on heavily loaded systems.\n\nNow that workqueue code has been updated to deal with multiple\nworker_pools per global_cwq, this patch reimplements WQ_HIGHPRI using\na separate worker_pool.  NR_WORKER_POOLS is bumped to two and\ngcwq-\u003epools[0] is used for normal pri work items and -\u003epools[1] for\nhighpri.  Highpri workers get -20 nice level and has \u0027H\u0027 suffix in\ntheir names.  Note that this change increases the number of kworkers\nper cpu.\n\nPOOL_HIGHPRI_PENDING, pool_determine_ins_pos() and highpri chain\nwakeup code in process_one_work() are no longer used and removed.\n\nThis allows proper prioritization of highpri work items and removes\nhigh execution latency of highpri work items.\n\nv2: nr_running indexing bug in get_pool_nr_running() fixed.\n\nv3: Refreshed for the get_pool_nr_running() update in the previous\n    patch.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Josh Hunt \u003cjoshhunt00@gmail.com\u003e\nLKML-Reference: \u003cCAKA\u003dqzaHqwZ8eqpLNFjxnO2fX-tgAOjmpvxgBFjv6dJeQaOW1w@mail.gmail.com\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\n"
    },
    {
      "commit": "4ce62e9e30cacc26885cab133ad1de358dd79f21",
      "tree": "6b08a377a236f0e44f335f7813d3da58a7ee1c70",
      "parents": [
        "11ebea50dbc1ade5994b2c838a096078d4c02399"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jul 13 22:16:44 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Jul 13 22:16:44 2012 -0700"
      },
      "message": "workqueue: introduce NR_WORKER_POOLS and for_each_worker_pool()\n\nIntroduce NR_WORKER_POOLS and for_each_worker_pool() and convert code\npaths which need to manipulate all pools in a gcwq to use them.\nNR_WORKER_POOLS is currently one and for_each_worker_pool() iterates\nover only @gcwq-\u003epool.\n\nNote that nr_running is per-pool property and converted to an array\nwith NR_WORKER_POOLS elements and renamed to pool_nr_running.  Note\nthat get_pool_nr_running() currently assumes 0 index.  The next patch\nwill make use of non-zero index.\n\nThe changes in this patch are mechanical and don\u0027t caues any\nfunctional difference.  This is to prepare for multiple pools per\ngcwq.\n\nv2: nr_running indexing bug in get_pool_nr_running() fixed.\n\nv3: Pointer to array is stupid.  Don\u0027t use it in get_pool_nr_running()\n    as suggested by Linus.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "11ebea50dbc1ade5994b2c838a096078d4c02399",
      "tree": "c0553ac78d52512ee1c2dfe65049554898dd6638",
      "parents": [
        "63d95a9150ee3bbd4117fcd609dee40313b454d9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "message": "workqueue: separate out worker_pool flags\n\nGCWQ_MANAGE_WORKERS, GCWQ_MANAGING_WORKERS and GCWQ_HIGHPRI_PENDING\nare per-pool properties.  Add worker_pool-\u003eflags and make the above\nthree flags per-pool flags.\n\nThe changes in this patch are mechanical and don\u0027t caues any\nfunctional difference.  This is to prepare for multiple pools per\ngcwq.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "63d95a9150ee3bbd4117fcd609dee40313b454d9",
      "tree": "0833d49afe4478586d791217772dcdef974f662f",
      "parents": [
        "bd7bdd43dcb81bb08240b9401b36a104f77dc135"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "message": "workqueue: use @pool instead of @gcwq or @cpu where applicable\n\nModify all functions which deal with per-pool properties to pass\naround @pool instead of @gcwq or @cpu.\n\nThe changes in this patch are mechanical and don\u0027t caues any\nfunctional difference.  This is to prepare for multiple pools per\ngcwq.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "bd7bdd43dcb81bb08240b9401b36a104f77dc135",
      "tree": "4d12a15e7e72f2d64fb6e58a145e56b4da1a341a",
      "parents": [
        "974271c485a4d8bb801decc616748f90aafb07ec"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "message": "workqueue: factor out worker_pool from global_cwq\n\nMove worklist and all worker management fields from global_cwq into\nthe new struct worker_pool.  worker_pool points back to the containing\ngcwq.  worker and cpu_workqueue_struct are updated to point to\nworker_pool instead of gcwq too.\n\nThis change is mechanical and doesn\u0027t introduce any functional\ndifference other than rearranging of fields and an added level of\nindirection in some places.  This is to prepare for multiple pools per\ngcwq.\n\nv2: Comment typo fixes as suggested by Namhyung.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Namhyung Kim \u003cnamhyung@kernel.org\u003e\n"
    },
    {
      "commit": "974271c485a4d8bb801decc616748f90aafb07ec",
      "tree": "ed3e41b86293b207127a03bde638e4dd6acf6d58",
      "parents": [
        "918227bb1b59444a2c467711fd50cc22bb4a897b"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Jul 12 14:46:37 2012 -0700"
      },
      "message": "workqueue: don\u0027t use WQ_HIGHPRI for unbound workqueues\n\nUnbound wqs aren\u0027t concurrency-managed and try to execute work items\nas soon as possible.  This is currently achieved by implicitly setting\n%WQ_HIGHPRI on all unbound workqueues; however, WQ_HIGHPRI\nimplementation is about to be restructured and this usage won\u0027t be\nvalid anymore.\n\nAdd an explicit chain-wakeup path for unbound workqueues in\nprocess_one_work() instead of piggy backing on %WQ_HIGHPRI.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "4d82a1debbffec129cc387aafa8f40b7bbab3297",
      "tree": "64e7bc03962b99fa9b8c4cdb603d1784185a2a20",
      "parents": [
        "544ecf310f0e7f51fa057ac2a295fc1b3b35a9d3"
      ],
      "author": {
        "name": "Peter Zijlstra",
        "email": "peterz@infradead.org",
        "time": "Tue May 15 08:06:19 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue May 15 08:08:31 2012 -0700"
      },
      "message": "lockdep: fix oops in processing workqueue\n\nUnder memory load, on x86_64, with lockdep enabled, the workqueue\u0027s\nprocess_one_work() has been seen to oops in __lock_acquire(), barfing\non a 0xffffffff00000000 pointer in the lockdep_map\u0027s class_cache[].\n\nBecause it\u0027s permissible to free a work_struct from its callout function,\nthe map used is an onstack copy of the map given in the work_struct: and\nthat copy is made without any locking.\n\nSurprisingly, gcc (4.5.1 in Hugh\u0027s case) uses \"rep movsl\" rather than\n\"rep movsq\" for that structure copy: which might race with a workqueue\nuser\u0027s wait_on_work() doing lock_map_acquire() on the source of the\ncopy, putting a pointer into the class_cache[], but only in time for\nthe top half of that pointer to be copied to the destination map.\n\nBoom when process_one_work() subsequently does lock_map_acquire()\non its onstack copy of the lockdep_map.\n\nFix this, and a similar instance in call_timer_fn(), with a\nlockdep_copy_map() function which additionally NULLs the class_cache[].\n\nNote: this oops was actually seen on 3.4-next, where flush_work() newly\ndoes the racing lock_map_acquire(); but Tejun points out that 3.4 and\nearlier are already vulnerable to the same through wait_on_work().\n\n* Patch orginally from Peter.  Hugh modified it a bit and wrote the\n  description.\n\nSigned-off-by: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nReported-by: Hugh Dickins \u003chughd@google.com\u003e\nLKML-Reference: \u003calpine.LSU.2.00.1205070951170.1544@eggly.anvils\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "544ecf310f0e7f51fa057ac2a295fc1b3b35a9d3",
      "tree": "417e606b3a1a7eaa31a3847a5101db37041e0c20",
      "parents": [
        "0976dfc1d0cd80a4e9dfaf87bd8744612bde475a"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon May 14 15:04:50 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon May 14 15:04:50 2012 -0700"
      },
      "message": "workqueue: skip nr_running sanity check in worker_enter_idle() if trustee is active\n\nworker_enter_idle() has WARN_ON_ONCE() which triggers if nr_running\nisn\u0027t zero when every worker is idle.  This can trigger spuriously\nwhile a cpu is going down due to the way trustee sets %WORKER_ROGUE\nand zaps nr_running.\n\nIt first sets %WORKER_ROGUE on all workers without updating\nnr_running, releases gcwq-\u003elock, schedules, regrabs gcwq-\u003elock and\nthen zaps nr_running.  If the last running worker enters idle\ninbetween, it would see stale nr_running which hasn\u0027t been zapped yet\nand trigger the WARN_ON_ONCE().\n\nFix it by performing the sanity check iff the trustee is idle.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: \"Paul E. McKenney\" \u003cpaulmck@linux.vnet.ibm.com\u003e\nCc: stable@vger.kernel.org\n"
    },
    {
      "commit": "0976dfc1d0cd80a4e9dfaf87bd8744612bde475a",
      "tree": "0af2d79070fcb0a510187eb780db796c5702df20",
      "parents": [
        "f5b2552b4ebbeadcadde1532d7bbd3f850719046"
      ],
      "author": {
        "name": "Stephen Boyd",
        "email": "sboyd@codeaurora.org",
        "time": "Fri Apr 20 17:28:50 2012 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 23 11:06:42 2012 -0700"
      },
      "message": "workqueue: Catch more locking problems with flush_work()\n\nIf a workqueue is flushed with flush_work() lockdep checking can\nbe circumvented. For example:\n\n static DEFINE_MUTEX(mutex);\n\n static void my_work(struct work_struct *w)\n {\n         mutex_lock(\u0026mutex);\n         mutex_unlock(\u0026mutex);\n }\n\n static DECLARE_WORK(work, my_work);\n\n static int __init start_test_module(void)\n {\n         schedule_work(\u0026work);\n         return 0;\n }\n module_init(start_test_module);\n\n static void __exit stop_test_module(void)\n {\n         mutex_lock(\u0026mutex);\n         flush_work(\u0026work);\n         mutex_unlock(\u0026mutex);\n }\n module_exit(stop_test_module);\n\nwould not always print a warning when flush_work() was called.\nIn this trivial example nothing could go wrong since we are\nguaranteed module_init() and module_exit() don\u0027t run concurrently,\nbut if the work item is schedule asynchronously we could have a\nscenario where the work item is running just at the time flush_work()\nis called resulting in a classic ABBA locking problem.\n\nAdd a lockdep hint by acquiring and releasing the work item\nlockdep_map in flush_work() so that we always catch this\npotential deadlock scenario.\n\nSigned-off-by: Stephen Boyd \u003csboyd@codeaurora.org\u003e\nReviewed-by: Yong Zhang \u003cyong.zhang0@gmail.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "f5b2552b4ebbeadcadde1532d7bbd3f850719046",
      "tree": "89bbf52668883f0a4c65ed10bd113a5cc4d75721",
      "parents": [
        "d3283fb45c06dfd7b1a36da8e6ff39d313f0600c"
      ],
      "author": {
        "name": "Dan Carpenter",
        "email": "dan.carpenter@oracle.com",
        "time": "Fri Apr 13 22:06:58 2012 +0300"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 16 14:54:59 2012 -0700"
      },
      "message": "workqueue: change BUG_ON() to WARN_ON()\n\nThis BUG_ON() can be triggered if you call schedule_work() before\ncalling INIT_WORK().  It is a bug definitely, but it\u0027s nicer to just\nprint a stack trace and return.\n\nReported-by: Matt Renzelmann \u003cmjr@cs.wisc.edu\u003e\nSigned-off-by: Dan Carpenter \u003cdan.carpenter@oracle.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "e45836fafe157df137a837093037f741ad8f4c90",
      "tree": "cba5fdef1fd2e70f3610c78dbcb56ebd1be67654",
      "parents": [
        "0d9cabdccedb79ee5f27b77ff51f29a9e7d23275",
        "e06ffa1ede4146cbc261d90f5dff3d63fe2e9d7a"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 20 18:13:22 2012 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 20 18:13:22 2012 -0700"
      },
      "message": "Merge branch \u0027for-3.4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq\n\nPull workqueue changes from Tejun Heo:\n \"This contains only one commit which cleans up UP allocation path a\n  bit.\"\n\n* \u0027for-3.4\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:\n  workqueue: use percpu allocator for cwq on UP\n"
    },
    {
      "commit": "e06ffa1ede4146cbc261d90f5dff3d63fe2e9d7a",
      "tree": "3d8a7bccc95926aeb08c1b03e1ea8cffe722d38c",
      "parents": [
        "fde7d9049e55ab85a390be7f415d74c9f62dd0f9"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Fri Mar 09 18:03:20 2012 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 12 09:21:17 2012 -0700"
      },
      "message": "workqueue: use percpu allocator for cwq on UP\n\nI notice that the commit bbddff makes percpu allocator can work on UP,\nSo we don\u0027t need the magic way for UP.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "62d3c5439c534b0e6c653fc63e6d8c67be3a57b1",
      "tree": "d335d0e449ef2d61d52921e3f210cdd403bb025a",
      "parents": [
        "cecd353a02fb1405c8a72a324b26b5acf97e7411"
      ],
      "author": {
        "name": "Alan Stern",
        "email": "stern@rowland.harvard.edu",
        "time": "Fri Mar 02 10:51:00 2012 +0100"
      },
      "committer": {
        "name": "Jens Axboe",
        "email": "axboe@kernel.dk",
        "time": "Fri Mar 02 10:51:00 2012 +0100"
      },
      "message": "Block: use a freezable workqueue for disk-event polling\n\nThis patch (as1519) fixes a bug in the block layer\u0027s disk-events\npolling.  The polling is done by a work routine queued on the\nsystem_nrt_wq workqueue.  Since that workqueue isn\u0027t freezable, the\npolling continues even in the middle of a system sleep transition.\n\nObviously, polling a suspended drive for media changes and such isn\u0027t\na good thing to do; in the case of USB mass-storage devices it can\nlead to real problems requiring device resets and even re-enumeration.\n\nThe patch fixes things by creating a new system-wide, non-reentrant,\nfreezable workqueue and using it for disk-events polling.\n\nSigned-off-by: Alan Stern \u003cstern@rowland.harvard.edu\u003e\nCC: \u003cstable@kernel.org\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Rafael J. Wysocki \u003crjw@sisk.pl\u003e\nSigned-off-by: Jens Axboe \u003caxboe@kernel.dk\u003e\n"
    },
    {
      "commit": "b196be89cdc14a88cc637cdad845a75c5886c82d",
      "tree": "195816e6ab82362969409b3317d223421502224a",
      "parents": [
        "0499680a42141d86417a8fbaa8c8db806bea1201"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jan 10 15:11:35 2012 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jan 10 16:30:54 2012 -0800"
      },
      "message": "workqueue: make alloc_workqueue() take printf fmt and args for name\n\nalloc_workqueue() currently expects the passed in @name pointer to remain\naccessible.  This is inconvenient and a bit silly given that the whole wq\nis being dynamically allocated.  This patch updates alloc_workqueue() and\nfriends to take printf format string instead of opaque string and matching\nvarargs at the end.  The name is allocated together with the wq and\nformatted.\n\nalloc_ordered_workqueue() is converted to a macro to unify varargs\nhandling with alloc_workqueue(), and, while at it, add comment to\nalloc_workqueue().\n\nNone of the current in-kernel users pass in string with \u0027%\u0027 as constant\nname and this change shouldn\u0027t cause any problem.\n\n[akpm@linux-foundation.org: use __printf]\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nSuggested-by: Christoph Hellwig \u003chch@infradead.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9984de1a5a8a96275fcab818f7419af5a3c86e71",
      "tree": "1935d411752707a1621c5caf64f75dfe105beb3a",
      "parents": [
        "7c77509c542927ee2a3c8812fad84957e51bf67d"
      ],
      "author": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon May 23 14:51:41 2011 -0400"
      },
      "committer": {
        "name": "Paul Gortmaker",
        "email": "paul.gortmaker@windriver.com",
        "time": "Mon Oct 31 09:20:12 2011 -0400"
      },
      "message": "kernel: Map most files to use export.h instead of module.h\n\nThe changed files were only including linux/module.h for the\nEXPORT_SYMBOL infrastructure, and nothing else.  Revector them\nonto the isolated export header for faster compile times.\n\nNothing to see here but a whole lot of instances of:\n\n  -#include \u003clinux/module.h\u003e\n  +#include \u003clinux/export.h\u003e\n\nThis commit is only changing the kernel dir; next targets\nwill probably be mm, fs, the arch dirs, etc.\n\nSigned-off-by: Paul Gortmaker \u003cpaul.gortmaker@windriver.com\u003e\n"
    },
    {
      "commit": "fa2563e41c3d6d6e8af437643981ed28ae0cb56d",
      "tree": "7d0dbcc4214a3bceb4d1dd9251df88752c1313b5",
      "parents": [
        "df4e33ad249b7480d6ba5dd11fc1dac5cfaffce1"
      ],
      "author": {
        "name": "Thomas Tuttle",
        "email": "ttuttle@chromium.org",
        "time": "Wed Sep 14 16:22:28 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Sep 14 18:09:38 2011 -0700"
      },
      "message": "workqueue: lock cwq access in drain_workqueue\n\nTake cwq-\u003egcwq-\u003elock to avoid racing between drain_workqueue checking to\nmake sure the workqueues are empty and cwq_dec_nr_in_flight decrementing\nand then incrementing nr_active when it activates a delayed work.\n\nWe discovered this when a corner case in one of our drivers resulted in\nus trying to destroy a workqueue in which the remaining work would\nalways requeue itself again in the same workqueue.  We would hit this\nrace condition and trip the BUG_ON on workqueue.c:3080.\n\nSigned-off-by: Thomas Tuttle \u003cttuttle@chromium.org\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5a791ea4fa4495f7136679cb5366f6544148e613",
      "tree": "dc27644add7d5f1165db19c28c25ae842e5f96b2",
      "parents": [
        "8209f53d79444747782a28520187abaf689761f2",
        "9c5a2ba70251ecaab18c7a83e38b3c620223476c"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jul 22 15:07:15 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Jul 22 15:07:15 2011 -0700"
      },
      "message": "Merge branch \u0027for-3.1\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq\n\n* \u0027for-3.1\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:\n  workqueue: separate out drain_workqueue() from destroy_workqueue()\n  workqueue: remove cancel_rearming_delayed_work[queue]()\n"
    },
    {
      "commit": "5129df03d0c44b2d5a5f9d7d52f3b079706b9a8f",
      "tree": "799e309a7db032cb7abe9f0fa910c2989c3fdab5",
      "parents": [
        "4d429480352c63db2228489f0db9fd381cdc3c9c",
        "6988f20fe04e9ef3aea488cb8ab57fbeb78e12f0"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 24 11:53:42 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue May 24 11:53:42 2011 -0700"
      },
      "message": "Merge branch \u0027for-2.6.40\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu\n\n* \u0027for-2.6.40\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:\n  percpu: Unify input section names\n  percpu: Avoid extra NOP in percpu_cmpxchg16b_double\n  percpu: Cast away printk format warning\n  percpu: Always align percpu output section to PAGE_SIZE\n\nFix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun\n"
    },
    {
      "commit": "9c5a2ba70251ecaab18c7a83e38b3c620223476c",
      "tree": "ece2c035b761af1332ea027f32443a6d05b16bc9",
      "parents": [
        "2543a87108d2af7d48a43b3d6685c2b1ea279e36"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Apr 05 18:01:44 2011 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri May 20 13:54:46 2011 +0200"
      },
      "message": "workqueue: separate out drain_workqueue() from destroy_workqueue()\n\nThere are users which want to drain workqueues without destroying it.\nSeparate out drain functionality from destroy_workqueue() into\ndrain_workqueue() and make it accessible to workqueue users.\n\nTo guarantee forward-progress, only chain queueing is allowed while\ndrain is in progress.  If a new work item which isn\u0027t chained from the\nrunning or pending work items is queued while draining is in progress,\nWARN_ON_ONCE() is triggered.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: James Bottomley \u003cJames.Bottomley@hansenpartnership.com\u003e\n"
    },
    {
      "commit": "5035b20fa5cd146b66f5f89619c20a4177fb736d",
      "tree": "cd62bba3a3c36164d0faaac1b3c922be0eca11f1",
      "parents": [
        "e2de9e0862778f4aba103027ce575efbddb8117f"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Apr 29 18:08:37 2011 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Apr 29 18:08:37 2011 +0200"
      },
      "message": "workqueue: fix deadlock in worker_maybe_bind_and_lock()\n\nIf a rescuer and stop_machine() bringing down a CPU race with each\nother, they may deadlock on non-preemptive kernel.  The CPU won\u0027t\naccept a new task, so the rescuer can\u0027t migrate to the target CPU,\nwhile stop_machine() can\u0027t proceed because the rescuer is holding one\nof the CPU retrying migration.  GCWQ_DISASSOCIATED is never cleared\nand worker_maybe_bind_and_lock() retries indefinitely.\n\nThis problem can be reproduced semi reliably while the system is\nentering suspend.\n\n http://thread.gmane.org/gmane.linux.kernel/1122051\n\nA lot of kudos to Thilo-Alexander for reporting this tricky issue and\npainstaking testing.\n\nstable: This affects all kernels with cmwq, so all kernels since and\n        including v2.6.36 need this fix.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Thilo-Alexander Ginkel \u003cthilo@ginkel.com\u003e\nTested-by: Thilo-Alexander Ginkel \u003cthilo@ginkel.com\u003e\nCc: stable@kernel.org\n"
    },
    {
      "commit": "0415b00d175e0d8945e6785aad21b5f157976ce0",
      "tree": "cf6f9286a47a22bf57766a3f17eaf4190bc9c242",
      "parents": [
        "6c5103890057b1bb781b26b7aae38d33e4c517d8"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Mar 24 18:50:09 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Mar 24 18:50:09 2011 +0100"
      },
      "message": "percpu: Always align percpu output section to PAGE_SIZE\n\nPercpu allocator honors alignment request upto PAGE_SIZE and both the\npercpu addresses in the percpu address space and the translated kernel\naddresses should be aligned accordingly.  The calculation of the\nformer depends on the alignment of percpu output section in the kernel\nimage.\n\nThe linker script macros PERCPU_VADDR() and PERCPU() are used to\ndefine this output section and the latter takes @align parameter.\nSeveral architectures are using @align smaller than PAGE_SIZE breaking\npercpu memory alignment.\n\nThis patch removes @align parameter from PERCPU(), renames it to\nPERCPU_SECTION() and makes it always align to PAGE_SIZE.  While at it,\nadd PCPU_SETUP_BUG_ON() checks such that alignment problems are\nreliably detected and remove percpu alignment comment recently added\nin workqueue.c as the condition would trigger BUG way before reaching\nthere.\n\nFor um, this patch raises the alignment of percpu area.  As the area\nis in .init, there shouldn\u0027t be any noticeable difference.\n\nThis problem was discovered by David Howells while debugging boot\nfailure on mn10300.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Mike Frysinger \u003cvapier@gentoo.org\u003e\nCc: uclinux-dist-devel@blackfin.uclinux.org\nCc: David Howells \u003cdhowells@redhat.com\u003e\nCc: Jeff Dike \u003cjdike@addtoit.com\u003e\nCc: user-mode-linux-devel@lists.sourceforge.net\n"
    },
    {
      "commit": "94dcf29a11b3d20a28790598d701f98484a969da",
      "tree": "21c65f6634dcde739bb85cbc019ee273f1427f90",
      "parents": [
        "207205a2ba2655652fe46a60b49838af6c16a919"
      ],
      "author": {
        "name": "Eric Dumazet",
        "email": "eric.dumazet@gmail.com",
        "time": "Tue Mar 22 16:30:45 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 22 17:44:01 2011 -0700"
      },
      "message": "kthread: use kthread_create_on_node()\n\nksoftirqd, kworker, migration, and pktgend kthreads can be created with\nkthread_create_on_node(), to get proper NUMA affinities for their stack and\ntask_struct.\n\nSigned-off-by: Eric Dumazet \u003ceric.dumazet@gmail.com\u003e\nAcked-by: David S. Miller \u003cdavem@davemloft.net\u003e\nReviewed-by: Andi Kleen \u003cak@linux.intel.com\u003e\nAcked-by: Rusty Russell \u003crusty@rustcorp.com.au\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Tony Luck \u003ctony.luck@intel.com\u003e\nCc: Fenghua Yu \u003cfenghua.yu@intel.com\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bd2895eeade5f11f3e5906283c630bbdb4b57454",
      "tree": "4d98f4fcd80c7d062afce28823d08aee53e66f82",
      "parents": [
        "016aa2ed1cc9cf704cf76d8df07751b6daa9750f",
        "24d51add7438f9696a7205927bf9de3c5c787a58"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 16 08:20:19 2011 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 16 08:20:19 2011 -0700"
      },
      "message": "Merge branch \u0027for-2.6.39\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq\n\n* \u0027for-2.6.39\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:\n  workqueue: fix build failure introduced by s/freezeable/freezable/\n  workqueue: add system_freezeable_wq\n  rds/ib: use system_wq instead of rds_ib_fmr_wq\n  net/9p: replace p9_poll_task with a work\n  net/9p: use system_wq instead of p9_mux_wq\n  xfs: convert to alloc_workqueue()\n  reiserfs: make commit_wq use the default concurrency level\n  ocfs2: use system_wq instead of ocfs2_quota_wq\n  ext4: convert to alloc_workqueue()\n  scsi/scsi_tgt_lib: scsi_tgtd isn\u0027t used in memory reclaim path\n  scsi/be2iscsi,qla2xxx: convert to alloc_workqueue()\n  misc/iwmc3200top: use system_wq instead of dedicated workqueues\n  i2o: use alloc_workqueue() instead of create_workqueue()\n  acpi: kacpi*_wq don\u0027t need WQ_MEM_RECLAIM\n  fs/aio: aio_wq isn\u0027t used in memory reclaim path\n  input/tps6507x-ts: use system_wq instead of dedicated workqueue\n  cpufreq: use system_wq instead of dedicated workqueues\n  wireless/ipw2x00: use system_wq instead of dedicated workqueues\n  arm/omap: use system_wq in mailbox\n  workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER\n"
    },
    {
      "commit": "997772884036e6e121de39322179989154437d9f",
      "tree": "618ef63c45e16892ea26a99cafef6b0442e8eca1",
      "parents": [
        "a5abba989deceb731047425812d268daf7536575"
      ],
      "author": {
        "name": "Stanislaw Gruszka",
        "email": "sgruszka@redhat.com",
        "time": "Mon Mar 07 09:58:33 2011 +0100"
      },
      "committer": {
        "name": "Thomas Gleixner",
        "email": "tglx@linutronix.de",
        "time": "Tue Mar 08 16:10:38 2011 +0100"
      },
      "message": "debugobjects: Add hint for better object identification\n\nIn complex subsystems like mac80211 structures can contain several\ntimers and work structs, so identifying a specific instance from the\ncall trace and object type output of debugobjects can be hard.\n\nAllow the subsystems which support debugobjects to provide a hint\nfunction. This function returns a pointer to a kernel address\n(preferrably the objects callback function) which is printed along\nwith the debugobjects type.\n\nAdd hint methods for timer_list, work_struct and hrtimer.\n\n[ tglx: Massaged changelog, made it compile ]\n\nSigned-off-by: Stanislaw Gruszka \u003csgruszka@redhat.com\u003e\nLKML-Reference: \u003c20110307085809.GA9334@redhat.com\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n"
    },
    {
      "commit": "24d51add7438f9696a7205927bf9de3c5c787a58",
      "tree": "133c4470edc09e70de6bc5b7910d43745801f469",
      "parents": [
        "43d133c18b44e7d82d82ef0dcc2bddd55d5dfe81"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Feb 21 09:52:50 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Feb 21 10:07:23 2011 +0100"
      },
      "message": "workqueue: fix build failure introduced by s/freezeable/freezable/\n\nwq:fixes-2.6.38 does s/WQ_FREEZEABLE/WQ_FREEZABLE and wq:for-2.6.39\nadds new usage of the flag.  The combination of the two creates a\nbuild failure after merge.  Fix it by renaming all freezeables to\nfreezables.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Stephen Rothwell \u003csfr@canb.auug.org.au\u003e\n"
    },
    {
      "commit": "43d133c18b44e7d82d82ef0dcc2bddd55d5dfe81",
      "tree": "8de75c837b55874cc8a81a29bdedbc62668d4481",
      "parents": [
        "4149efb22da66e326fc48baf80d628834509f7f0",
        "6f576d57f1fa0d6026b495d8746d56d949989161"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Feb 21 09:43:56 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Feb 21 09:43:56 2011 +0100"
      },
      "message": "Merge branch \u0027master\u0027 into for-2.6.39\n"
    },
    {
      "commit": "3233cdbd9fa347a6d6897a94cc6ed0302ae83c4f",
      "tree": "053948a81cb40a37d3afbd0f6ca8f3a106523c73",
      "parents": [
        "58a69cb47ec6991bf006a3e5d202e8571b0327a4"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 16 18:10:19 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 16 18:10:19 2011 +0100"
      },
      "message": "workqueue: make sure MAYDAY_INITIAL_TIMEOUT is at least 2 jiffies long\n\nMAYDAY_INITIAL_TIMEOUT is defined as HZ / 100 and depending on\nconfiguration may end up 0 or 1.  Even when it\u0027s 1, depending on when\nthe mayday timer is added in the current jiffy interval, it may expire\nway before a jiffy has passed.\n\nMake sure MAYDAY_INITIAL_TIMEOUT is at least two to guarantee that at\nleast a full jiffy has passed before calling rescuers.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Ray Jui \u003crjui@broadcom.com\u003e\nCc: stable@kernel.org\n"
    },
    {
      "commit": "58a69cb47ec6991bf006a3e5d202e8571b0327a4",
      "tree": "56abdf817649c352f70bff3263f9351ed6c42062",
      "parents": [
        "7576958a9d5a4a677ad7dd40901cdbb6c1110c98"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 16 09:25:31 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 16 17:48:59 2011 +0100"
      },
      "message": "workqueue, freezer: unify spelling of \u0027freeze\u0027 + \u0027able\u0027 to \u0027freezable\u0027\n\nThere are two spellings in use for \u0027freeze\u0027 + \u0027able\u0027 - \u0027freezable\u0027 and\n\u0027freezeable\u0027.  The former is the more prominent one.  The latter is\nmostly used by workqueue and in a few other odd places.  Unify the\nspelling to \u0027freezable\u0027.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Alan Stern \u003cstern@rowland.harvard.edu\u003e\nAcked-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\nAcked-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\nAcked-by: Dmitry Torokhov \u003cdtor@mail.ru\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nCc: Alex Dubov \u003coakad@yahoo.com\u003e\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nCc: Steven Whitehouse \u003cswhiteho@redhat.com\u003e\n"
    },
    {
      "commit": "7576958a9d5a4a677ad7dd40901cdbb6c1110c98",
      "tree": "db0b180feebf3a4ca6cd3155764cfc61a6d7f3cf",
      "parents": [
        "795abaf1e4e188c4171e3cd3dbb11a9fcacaf505"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Feb 14 14:04:46 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Feb 14 14:04:46 2011 +0100"
      },
      "message": "workqueue: wake up a worker when a rescuer is leaving a gcwq\n\nAfter executing the matching works, a rescuer leaves the gcwq whether\nthere are more pending works or not.  This may decrease the\nconcurrency level to zero and stall execution until a new work item is\nqueued on the gcwq.\n\nMake rescuer wake up a regular worker when it leaves a gcwq if there\nare more works to execute, so that execution isn\u0027t stalled.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Ray Jui \u003crjui@broadcom.com\u003e\nCc: stable@kernel.org\n"
    },
    {
      "commit": "4149efb22da66e326fc48baf80d628834509f7f0",
      "tree": "f55c97e3678eaff010a36b97bcde0e9d2294ccb4",
      "parents": [
        "c534a107e8fe446202b0fab102abc015c56c0317"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Feb 08 10:39:03 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 09 09:37:49 2011 +0100"
      },
      "message": "workqueue: add system_freezeable_wq\n\nAdd system wide freezeable workqueue.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Dmitry Torokhov \u003cdmitry.torokhov@gmail.com\u003e\nCc: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\n"
    },
    {
      "commit": "42c025f3de9042d9c9abd9a6f6205d1a0f4bcadf",
      "tree": "67c618a227059548e2be915560aa113f590e6d5e",
      "parents": [
        "e159489baa717dbae70f9903770a6a4990865887"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jan 11 15:58:49 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jan 11 16:03:14 2011 +0100"
      },
      "message": "workqueue: note the nested NOT_RUNNING test in worker_clr_flags() isn\u0027t a noop\n\nThe nested NOT_RUNNING test in worker_clr_flags() is slightly\nmisleading in that if NOT_RUNNING were a single flag the nested test\nwould be always %true and thus noop.  Add a comment noting that the\ntest isn\u0027t a noop.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Hillf Danton \u003cdhillf@gmail.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e159489baa717dbae70f9903770a6a4990865887",
      "tree": "6e2ae803ff6ebed558ebbe03bf3ae5bda1dd6ebc",
      "parents": [
        "0c21e3aaf6ae85bee804a325aa29c325209180fd"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Sun Jan 09 23:32:15 2011 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Jan 11 15:33:01 2011 +0100"
      },
      "message": "workqueue: relax lockdep annotation on flush_work()\n\nCurrently, the lockdep annotation in flush_work() requires exclusive\naccess on the workqueue the target work is queued on and triggers\nwarning if a work is trying to flush another work on the same\nworkqueue; however, this is no longer true as workqueues can now\nexecute multiple works concurrently.\n\nThis patch adds lock_map_acquire_read() and make process_one_work()\nhold read access to the workqueue while executing a work and\nstart_flush_work() check for write access if concurrnecy level is one\nor the workqueue has a rescuer (as only one execution resource - the\nrescuer - is guaranteed to be available under memory pressure), and\nread access if higher.\n\nThis better represents what\u0027s going on and removes spurious lockdep\nwarnings which are triggered by fake dependency chain created through\nflush_work().\n\n* Peter pointed out that flushing another work from a WQ_MEM_RECLAIM\n  wq breaks forward progress guarantee under memory pressure.\n  Condition check accordingly updated.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\nTested-by: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: stable@kernel.org\n"
    },
    {
      "commit": "c8efcc2589464ac70255bb83e10cad61c7c6d295",
      "tree": "a7f9c975831344ba78d3a2f9d252749d0479ca2b",
      "parents": [
        "ed41390fa57a21d06e6e3a3c4bc238bab8957fbb"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Dec 20 19:32:04 2010 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Dec 20 19:32:04 2010 +0100"
      },
      "message": "workqueue: allow chained queueing during destruction\n\nCurrently, destroy_workqueue() makes the workqueue deny all new\nqueueing by setting WQ_DYING and flushes the workqueue once before\nproceeding with destruction; however, there are cases where work items\nqueue more related work items.  Currently, such users need to\nexplicitly flush the workqueue multiple times depending on the\npossible depth of such chained queueing.\n\nThis patch updates the queueing path such that a work item can queue\nfurther work items on the same workqueue even when WQ_DYING is set.\nThe flush on destruction is automatically retried until the workqueue\nis empty.  This guarantees that the workqueue is empty on destruction\nwhile allowing chained queueing.\n\nThe flush retry logic whines if it takes too many retries to drain the\nworkqueue.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: James Bottomley \u003cJames.Bottomley@HansenPartnership.com\u003e\n"
    },
    {
      "commit": "2d64672ed38721b7a3815009d79bfb90a1f34a17",
      "tree": "91a52918b036a07bf8008eeae6e7dccf967fa4e0",
      "parents": [
        "3e6cd7a4b6a04cf354a18c9d2e7ecec8fa1772fb"
      ],
      "author": {
        "name": "Steven Rostedt",
        "email": "srostedt@redhat.com",
        "time": "Fri Dec 03 23:12:33 2010 -0500"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Dec 14 15:05:54 2010 +0100"
      },
      "message": "workqueue: It is likely that WORKER_NOT_RUNNING is true\n\nRunning the annotate branch profiler on three boxes, including my\nmain box that runs firefox, evolution, xchat, and is part of the distcc farm,\nshowed this with the likelys in the workqueue code:\n\n correct incorrect  %        Function                  File              Line\n ------- ---------  -        --------                  ----              ----\n      96   996253  99 wq_worker_sleeping             workqueue.c          703\n      96   996247  99 wq_worker_waking_up            workqueue.c          677\n\nThe likely()s in this case were assuming that WORKER_NOT_RUNNING will\nmost likely be false. But this is not the case. The reason is\n(and shown by adding trace_printks and testing it) that most of the time\nWORKER_PREP is set.\n\nIn worker_thread() we have:\n\n\tworker_clr_flags(worker, WORKER_PREP);\n\n\t[ do work stuff ]\n\n\tworker_set_flags(worker, WORKER_PREP, false);\n\n(that \u0027false\u0027 means not to wake up an idle worker)\n\nThe wq_worker_sleeping() is called from schedule when a worker thread\nis putting itself to sleep. Which happens most of the time outside\nof that [ do work stuff ].\n\nThe wq_worker_waking_up is called by the wakeup worker code, which\nis also callod outside that [ do work stuff ].\n\nThus, the likely and unlikely used by those two functions are actually\nbackwards.\n\nRemove the annotation and let gcc figure it out.\n\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "e5cba24e3f018d4beb6acd101a82483c98f91ce7",
      "tree": "687339b9d285c7d19d5c521cae9a30bd9b389631",
      "parents": [
        "698fd6a2c3ca05ec796072defb5c415289a86cdc"
      ],
      "author": {
        "name": "Hitoshi Mitake",
        "email": "mitake@dcl.info.waseda.ac.jp",
        "time": "Fri Nov 26 12:06:44 2010 +0100"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Nov 26 12:06:44 2010 +0100"
      },
      "message": "workqueue: check the allocation of system_unbound_wq\n\nI found a trivial bug on initialization of workqueue.\nCurrent init_workqueues doesn\u0027t check the result of\nallocation of system_unbound_wq, this should be checked\nlike other queues.\n\nSigned-off-by: Hitoshi Mitake \u003cmitake@dcl.info.waseda.ac.jp\u003e\nCc: Arjan van de Ven \u003carjan@linux.intel.com\u003e\nCc: David Howells \u003cdhowells@redhat.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "ca1cab37d91cbe8a8333732540d43cabb54cfa85",
      "tree": "ea936dc8e5eb80b02fdf1d970bcb6f2e836051b9",
      "parents": [
        "99dc829256bb8cfcb1f58b7f118893fdbf608e60"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Tue Oct 26 14:22:34 2010 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Oct 26 16:52:14 2010 -0700"
      },
      "message": "workqueues: s/ON_STACK/ONSTACK/\n\nSilly though it is, completions and wait_queue_heads use foo_ONSTACK\n(COMPLETION_INITIALIZER_ONSTACK, DECLARE_COMPLETION_ONSTACK,\n__WAIT_QUEUE_HEAD_INIT_ONSTACK and DECLARE_WAIT_QUEUE_HEAD_ONSTACK) so I\nguess workqueues should do the same thing.\n\ns/INIT_WORK_ON_STACK/INIT_WORK_ONSTACK/\ns/INIT_DELAYED_WORK_ON_STACK/INIT_DELAYED_WORK_ONSTACK/\n\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "5260562754c0aa4b95eebb1f851eaccce7286365",
      "tree": "5702b9da6869d2769e4e88472b2c39b643187174",
      "parents": [
        "74eb94b218d087798a52c0b4f1379b635287a4b8"
      ],
      "author": {
        "name": "David Howells",
        "email": "dhowells@redhat.com",
        "time": "Mon Oct 25 23:41:11 2010 +0100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Oct 25 16:24:06 2010 -0700"
      },
      "message": "MN10300: Fix the PERCPU() alignment to allow for workqueues\n\nIn the MN10300 arch, we occasionally see an assertion being tripped in\nalloc_cwqs() at the following line:\n\n        /* just in case, make sure it\u0027s actually aligned */\n  ---\u003e  BUG_ON(!IS_ALIGNED(wq-\u003ecpu_wq.v, align));\n        return wq-\u003ecpu_wq.v ? 0 : -ENOMEM;\n\nThe values are:\n\n        wa-\u003ecpu_wq.v \u003d\u003e 0x902776e0\n        align \u003d\u003e 0x100\n\nand align is calculated by the following:\n\n        const size_t align \u003d max_t(size_t, 1 \u003c\u003c WORK_STRUCT_FLAG_BITS,\n                                   __alignof__(unsigned long long));\n\nThis is because the pointer in question (wq-\u003ecpu_wq.v) loses some of its\nlower bits to control flags, and so the object it points to must be\nsufficiently aligned to avoid the need to use those bits for pointing to\nthings.\n\nCurrently, 4 control bits and 4 colour bits are used in normal\ncircumstances, plus a debugging bit if debugging is set.  This requires\nthe cpu_workqueue_struct struct to be at least 256 bytes aligned (or 512\nbytes aligned with debugging).\n\nPERCPU() alignment on MN13000, however, is only 32 bytes as set in\nvmlinux.lds.S.  So we set this to PAGE_SIZE (4096) to match most other\narches and stick a comment in alloc_cwqs() for anyone else who triggers\nthe assertion.\n\nReported-by: Akira Takeuchi \u003ctakeuchi.akr@jp.panasonic.com\u003e\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Mark Salter \u003cmsalter@redhat.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "daaae6b010ac0f60c9c35e481589966f9f1fcc22",
      "tree": "94f4f463d898af0ad1926b8d21c15db94a0a411a",
      "parents": [
        "31ddd871fc3db73e2024cb3eb3ee5051edf5a80f"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Oct 19 11:28:15 2010 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Oct 19 11:28:15 2010 +0200"
      },
      "message": "workqueue: remove in_workqueue_context()\n\nCommit a25909a4 (lockdep: Add an in_workqueue_context() lockdep-based\ntest function) added in_workqueue_context() but there hasn\u0027t been any\nin-kernel user and the lockdep annotation in workqueue is scheduled to\nchange.  Remove the unused function.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Paul E. McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\n"
    },
    {
      "commit": "31ddd871fc3db73e2024cb3eb3ee5051edf5a80f",
      "tree": "3a2d578ec9ebefecca5e4cad196023bbe1a7d0f2",
      "parents": [
        "10ccd84695c2a03075bad2f4fc728575fe9051f8"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Oct 19 11:14:49 2010 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Oct 19 11:14:49 2010 +0200"
      },
      "message": "workqueue: Clarify that schedule_on_each_cpu is synchronous\n\nThe documentation for schedule_on_each_cpu() states that it calls a\nfunction on each online CPU from keventd.  This can easily be\ninterpreted as an asyncronous call because the description does not\nmention that flush_work is called.  Clarify that it is synchronous.\n\ntj: rephrased a bit\n\nSigned-off-by: Mel Gorman \u003cmel@csn.ul.ie\u003e\nReviewed-by: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "6370a6ad3b53df90b4700977f7718118a2cd524a",
      "tree": "2d1f45a19e66329813ce133b18f920d8c450b0c0",
      "parents": [
        "30310045dd20a286cf3800f063f79b468e132fb1"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Oct 11 15:12:27 2010 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Oct 11 15:20:26 2010 +0200"
      },
      "message": "workqueue: add and use WQ_MEM_RECLAIM flag\n\nAdd WQ_MEM_RECLAIM flag which currently maps to WQ_RESCUER, mark\nWQ_RESCUER as internal and replace all external WQ_RESCUER usages to\nWQ_MEM_RECLAIM.\n\nThis makes the API users express the intent of the workqueue instead\nof indicating the internal mechanism used to guarantee forward\nprogress.  This is also to make it cleaner to add more semantics to\nWQ_MEM_RECLAIM.  For example, if deemed necessary, memory reclaim\nworkqueues can be made highpri.\n\nThis patch doesn\u0027t introduce any functional change.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Jeff Garzik \u003cjgarzik@pobox.com\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nCc: Steven Whitehouse \u003cswhiteho@redhat.com\u003e\n"
    },
    {
      "commit": "30310045dd20a286cf3800f063f79b468e132fb1",
      "tree": "535dd3273332f18b245afd6a4142fcc49ada8e61",
      "parents": [
        "cdadf0097cdca06c497ffaeb5982e028c6e4ed38"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Oct 11 11:51:57 2010 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Oct 11 12:09:30 2010 +0200"
      },
      "message": "workqueue: fix HIGHPRI handling in keep_working()\n\nThe policy function keep_working() didn\u0027t check GCWQ_HIGHPRI_PENDING\nand could return %false with highpri work pending.  This could lead to\nlate execution of a highpri work which was delayed due to @max_active\nthrottling if other works are actively consuming CPU cycles.\n\nFor example, the following could happen.\n\n1. Work W0 which burns CPU cycles.\n\n2. Two works W1 and W2 are queued to a highpri wq w/ @max_active of 1.\n\n3. W1 starts executing and W2 is put to delayed queue.  W0 and W1 are\n   both runnable.\n\n4. W1 finishes which puts W2 to pending queue but keep_working()\n   incorrectly returns %false and the worker goes to sleep.\n\n5. W0 finishes and W2 starts execution.\n\nWith this patch applied, W2 starts execution as soon as W1 finishes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "cdadf0097cdca06c497ffaeb5982e028c6e4ed38",
      "tree": "e02400ea54981e9621a30d3a2ce013e14f657e2e",
      "parents": [
        "97bd234701b2b39a0e749c1fe0e44f1d14c94292"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Oct 05 10:49:55 2010 +0200"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Oct 05 10:49:55 2010 +0200"
      },
      "message": "workqueue: add queue_work and activate_work trace points\n\nThese two tracepoints allow tracking when and how a work is queued and\nactivated.  This patch is based on Frederic\u0027s patch to add queue_work\ntrace point.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\n"
    }
  ],
  "next": "97bd234701b2b39a0e749c1fe0e44f1d14c94292"
}
