)]}'
{
  "log": [
    {
      "commit": "f317ff9eed763e99bd226a447f93d42509434f43",
      "tree": "d77edfcdb1e7c32c30327f50dce04bcff8ec1531",
      "parents": [
        "13cc56013842a847a0f6ff805d9ed9181e753ef8",
        "a85f1a41f020bc2c97611060bcfae6f48a1db28d"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 02 19:53:30 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jul 02 19:53:30 2013 -0700"
      },
      "message": "Merge branch \u0027for-3.11\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq\n\nPull workqueue changes from Tejun Heo:\n \"Surprisingly, Lai and I didn\u0027t break too many things implementing\n  custom pools and stuff last time around and there aren\u0027t any follow-up\n  changes necessary at this point.\n\n  The only change in this pull request is Viresh\u0027s patches to make some\n  per-cpu workqueues to behave as unbound workqueues dependent on a boot\n  param whose default can be configured via a config option.  This leads\n  to higher processing overhead / lower bandwidth as more work items are\n  bounced across CPUs; however, it can lead to noticeable powersave in\n  certain configurations - ~10% w/ idlish constant workload on a\n  big.LITTLE configuration according to Viresh.\n\n  This is because per-cpu workqueues interfere with how the scheduler\n  perceives whether or not each CPU is idle by forcing pinned tasks on\n  them, which makes the scheduler\u0027s power-aware scheduling decisions\n  less effective.\n\n  Its effectiveness is likely less pronounced on homogenous\n  configurations and this type of optimization can probably be made\n  automatic; however, the changes are pretty minimal and the affected\n  workqueues are clearly marked, so it\u0027s an easy gain for some\n  configurations for the time being with pretty unintrusive changes.\"\n\n* \u0027for-3.11\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:\n  fbcon: queue work on power efficient wq\n  block: queue work on power efficient wq\n  PHYLIB: queue work on system_power_efficient_wq\n  workqueue: Add system wide power_efficient workqueues\n  workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueues\n"
    },
    {
      "commit": "1be0c25da56e860992af972a60321563ca2cfcd1",
      "tree": "8faa4eea13174184f254c8762c77a77c9ae39400",
      "parents": [
        "ad7b1f841f8a54c6d61ff181451f55b68175e15a"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed May 15 14:24:24 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed May 15 14:24:24 2013 -0700"
      },
      "message": "workqueue: don\u0027t perform NUMA-aware allocations on offline nodes in wq_numa_init()\n\nwq_numa_init() builds per-node cpumasks which are later used to make\nunbound workqueues NUMA-aware.  The cpumasks are allocated using\nalloc_cpumask_var_node() for all possible nodes.  Unfortunately, on\nmachines with off-line nodes, this leads to NUMA-aware allocations on\nexisting bug offline nodes, which in turn triggers BUG in the memory\nallocation code.\n\nFix it by using NUMA_NO_NODE for cpumask allocations for offline\nnodes.\n\n  kernel BUG at include/linux/gfp.h:323!\n  invalid opcode: 0000 [#1] SMP\n  Modules linked in:\n  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0+ #1\n  Hardware name: ProLiant BL465c G7, BIOS A19 12/10/2011\n  task: ffff880234608000 ti: ffff880234602000 task.ti: ffff880234602000\n  RIP: 0010:[\u003cffffffff8117495d\u003e]  [\u003cffffffff8117495d\u003e] new_slab+0x2ad/0x340\n  RSP: 0000:ffff880234603bf8  EFLAGS: 00010246\n  RAX: 0000000000000000 RBX: ffff880237404b40 RCX: 00000000000000d0\n  RDX: 0000000000000001 RSI: 0000000000000003 RDI: 00000000002052d0\n  RBP: ffff880234603c28 R08: 0000000000000000 R09: 0000000000000001\n  R10: 0000000000000001 R11: ffffffff812e3aa8 R12: 0000000000000001\n  R13: ffff8802378161c0 R14: 0000000000030027 R15: 00000000000040d0\n  FS:  0000000000000000(0000) GS:ffff880237800000(0000) knlGS:0000000000000000\n  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n  CR2: ffff88043fdff000 CR3: 00000000018d5000 CR4: 00000000000007f0\n  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n  Stack:\n   ffff880234603c28 0000000000000001 00000000000000d0 ffff8802378161c0\n   ffff880237404b40 ffff880237404b40 ffff880234603d28 ffffffff815edba1\n   ffff880237816140 0000000000000000 ffff88023740e1c0\n  Call Trace:\n   [\u003cffffffff815edba1\u003e] __slab_alloc+0x330/0x4f2\n   [\u003cffffffff81174b25\u003e] kmem_cache_alloc_node_trace+0xa5/0x200\n   [\u003cffffffff812e3aa8\u003e] alloc_cpumask_var_node+0x28/0x90\n   [\u003cffffffff81a0bdb3\u003e] wq_numa_init+0x10d/0x1be\n   [\u003cffffffff81a0bec8\u003e] init_workqueues+0x64/0x341\n   [\u003cffffffff810002ea\u003e] do_one_initcall+0xea/0x1a0\n   [\u003cffffffff819f1f31\u003e] kernel_init_freeable+0xb7/0x1ec\n   [\u003cffffffff815d50de\u003e] kernel_init+0xe/0xf0\n   [\u003cffffffff815ff89c\u003e] ret_from_fork+0x7c/0xb0\n  Code: 45  84 ac 00 00 00 f0 41 80 4d 00 40 e9 f6 fe ff ff 66 0f 1f 84 00 00 00 00 00 e8 eb 4b ff ff 49 89 c5 e9 05 fe ff ff \u003c0f\u003e 0b 4c 8b 73 38 44 89 ff 81 cf 00 00 20 00 4c 89 f6 48 c1 ee\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-and-Tested-by: Lingzhu Xiang \u003clxiang@redhat.com\u003e\n"
    },
    {
      "commit": "ad7b1f841f8a54c6d61ff181451f55b68175e15a",
      "tree": "6c413da4c6374ce569623cb395e5b8f57c02e530",
      "parents": [
        "8f174b1175a10903ade40f36eb6c896412877ca0"
      ],
      "author": {
        "name": "Marc Dionne",
        "email": "marc.c.dionne@gmail.com",
        "time": "Mon May 06 17:44:55 2013 -0400"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue May 14 11:52:51 2013 -0700"
      },
      "message": "workqueue: Make schedule_work() available again to non GPL modules\n\nCommit 8425e3d5bdbe (\"workqueue: inline trivial wrappers\") changed\nschedule_work() and schedule_delayed_work() to inline wrappers,\nbut these rely on some symbols that are EXPORT_SYMBOL_GPL, while\nthe original functions were EXPORT_SYMBOL.  This has the effect of\nchanging the licensing requirement for these functions and making\nthem unavailable to non GPL modules.\n\nMake them available again by removing the restriction on the\nrequired symbols.\n\nSigned-off-by: Marc Dionne \u003cmarc.dionne@your-file-system.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8f174b1175a10903ade40f36eb6c896412877ca0",
      "tree": "b6f1c9c7317ecc1092f582aca0160fdfb77c624e",
      "parents": [
        "d3251859168b0b12841e1b90d6d768ab478dc23d"
      ],
      "author": {
        "name": "Joonsoo Kim",
        "email": "js1304@gmail.com",
        "time": "Wed May 01 00:07:00 2013 +0900"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue May 14 11:48:15 2013 -0700"
      },
      "message": "workqueue: correct handling of the pool spin_lock\n\nWhen we fail to mutex_trylock(), we release the pool spin_lock and do\nmutex_lock(). After that, we should regrab the pool spin_lock, but,\nregrabbing is missed in current code. So correct it.\n\nCc: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Joonsoo Kim \u003ciamjoonsoo.kim@lge.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "0668106ca3865ba945e155097fb042bf66d364d3",
      "tree": "fbd6adfc2ae2f3c2b7fe7ad66d82cd7c64a001fb",
      "parents": [
        "cee22a15052faa817e3ec8985a28154d3fabc7aa"
      ],
      "author": {
        "name": "Viresh Kumar",
        "email": "viresh.kumar@linaro.org",
        "time": "Wed Apr 24 17:12:54 2013 +0530"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue May 14 10:50:06 2013 -0700"
      },
      "message": "workqueue: Add system wide power_efficient workqueues\n\nThis patch adds system wide workqueues aligned towards power saving. This is\ndone by allocating them with WQ_UNBOUND flag if \u0027wq_power_efficient\u0027 is set to\n\u0027true\u0027.\n\ntj: updated comments a bit.\n\nSigned-off-by: Viresh Kumar \u003cviresh.kumar@linaro.org\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "cee22a15052faa817e3ec8985a28154d3fabc7aa",
      "tree": "506028de7bd3bf7de08a7933b5601355f27c5262",
      "parents": [
        "f722406faae2d073cc1d01063d1123c35425939e"
      ],
      "author": {
        "name": "Viresh Kumar",
        "email": "viresh.kumar@linaro.org",
        "time": "Mon Apr 08 16:45:40 2013 +0530"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue May 14 10:50:06 2013 -0700"
      },
      "message": "workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueues\n\nWorkqueues can be performance or power-oriented. Currently, most workqueues are\nbound to the CPU they were created on. This gives good performance (due to cache\neffects) at the cost of potentially waking up otherwise idle cores (Idle from\nscheduler\u0027s perspective. Which may or may not be physically idle) just to\nprocess some work. To save power, we can allow the work to be rescheduled on a\ncore that is already awake.\n\nWorkqueues created with the WQ_UNBOUND flag will allow some power savings.\nHowever, we don\u0027t change the default behaviour of the system.  To enable\npower-saving behaviour, a new config option CONFIG_WQ_POWER_EFFICIENT needs to\nbe turned on. This option can also be overridden by the\nworkqueue.power_efficient boot parameter.\n\ntj: Updated config description and comments.  Renamed\n    CONFIG_WQ_POWER_EFFICIENT to CONFIG_WQ_POWER_EFFICIENT_DEFAULT.\n\nSigned-off-by: Viresh Kumar \u003cviresh.kumar@linaro.org\u003e\nReviewed-by: Amit Kucheria \u003camit.kucheria@linaro.org\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "d3251859168b0b12841e1b90d6d768ab478dc23d",
      "tree": "ccfb1c9c2da7e67d8b9d3ab9a0027a556f0a4fec",
      "parents": [
        "2dbd3cac87250a0d44e07acc86c4224a08522709"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri May 10 11:10:17 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri May 10 11:10:17 2013 -0700"
      },
      "message": "workqueue: workqueue_congested() shouldn\u0027t translate WORK_CPU_UNBOUND into node number\n\ndf2d5ae499 (\"workqueue: map an unbound workqueues to multiple per-node\npool_workqueues\") made unbound workqueues to map to multiple per-node\npool_workqueues and accordingly updated workqueue_contested() so that,\nfor unbound workqueues, it maps the specified @cpu to the NUMA node\nnumber to obtain the matching pool_workqueue to query the congested\nstate.\n\nBefore this change, workqueue_congested() ignored @cpu for unbound\nworkqueues as there was only one pool_workqueue and some users\n(fscache) called it with WORK_CPU_UNBOUND.  After the commit, this\ncauses the following oops as WORK_CPU_UNBOUND gets translated to\ngarbage by cpu_to_node().\n\n  BUG: unable to handle kernel paging request at ffff8803598d98b8\n  IP: [\u003cffffffff81043b7e\u003e] unbound_pwq_by_node+0xa1/0xfa\n  PGD 2421067 PUD 0\n  Oops: 0000 [#1] SMP\n  CPU: 1 PID: 2689 Comm: cat Tainted: GF            3.9.0-fsdevel+ #4\n  task: ffff88003d801040 ti: ffff880025806000 task.ti: ffff880025806000\n  RIP: 0010:[\u003cffffffff81043b7e\u003e]  [\u003cffffffff81043b7e\u003e] unbound_pwq_by_node+0xa1/0xfa\n  RSP: 0018:ffff880025807ad8  EFLAGS: 00010202\n  RAX: 0000000000000001 RBX: ffff8800388a2400 RCX: 0000000000000003\n  RDX: ffff880025807fd8 RSI: ffffffff81a31420 RDI: ffff88003d8016e0\n  RBP: ffff880025807ae8 R08: ffff88003d801730 R09: ffffffffa00b4898\n  R10: ffffffff81044217 R11: ffff88003d801040 R12: 0000000064206e97\n  R13: ffff880036059d98 R14: ffff880038cc8080 R15: ffff880038cc82d0\n  FS:  00007f21afd9c740(0000) GS:ffff88003d100000(0000) knlGS:0000000000000000\n  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\n  CR2: ffff8803598d98b8 CR3: 000000003df49000 CR4: 00000000000007e0\n  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400\n  Stack:\n   ffff8800388a2400 0000000000000002 ffff880025807b18 ffffffff810442ce\n   ffffffff81044217 ffff880000000002 ffff8800371b4080 ffff88003d112ec0\n   ffff880025807b38 ffffffffa00810b0 ffff880036059d88 ffff880036059be8\n  Call Trace:\n   [\u003cffffffff810442ce\u003e] workqueue_congested+0xb7/0x12c\n   [\u003cffffffffa00810b0\u003e] fscache_enqueue_object+0xb2/0xe8 [fscache]\n   [\u003cffffffffa007facd\u003e] __fscache_acquire_cookie+0x3b9/0x56c [fscache]\n   [\u003cffffffffa00ad8fe\u003e] nfs_fscache_set_inode_cookie+0xee/0x132 [nfs]\n   [\u003cffffffffa009e112\u003e] do_open+0x9/0xd [nfs]\n   [\u003cffffffff810e804a\u003e] do_dentry_open+0x175/0x24b\n   [\u003cffffffff810e8298\u003e] finish_open+0x41/0x51\n\nFix it by using smp_processor_id() if @cpu is WORK_CPU_UNBOUND.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: David Howells \u003cdhowells@redhat.com\u003e\nTested-and-Acked-by: David Howells \u003cdhowells@redhat.com\u003e\n"
    },
    {
      "commit": "3d1cb2059d9374e58da481b783332cf191cb6620",
      "tree": "b62afd1038ecabde21df35da3fbcc5e585b9516e",
      "parents": [
        "cd42d559e45e3563c74403e453f8954b593db69d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Apr 30 15:27:22 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Apr 30 17:04:02 2013 -0700"
      },
      "message": "workqueue: include workqueue info when printing debug dump of a worker task\n\nOne of the problems that arise when converting dedicated custom\nthreadpool to workqueue is that the shared worker pool used by workqueue\nanonimizes each worker making it more difficult to identify what the\nworker was doing on which target from the output of sysrq-t or debug\ndump from oops, BUG() and friends.\n\nThis patch implements set_worker_desc() which can be called from any\nworkqueue work function to set its description.  When the worker task is\ndumped for whatever reason - sysrq-t, WARN, BUG, oops, lockdep assertion\nand so on - the description will be printed out together with the\nworkqueue name and the worker function pointer.\n\nThe printing side is implemented by print_worker_info() which is called\nfrom functions in task dump paths - sched_show_task() and\ndump_stack_print_info().  print_worker_info() can be safely called on\nany task in any state as long as the task struct itself is accessible.\nIt uses probe_*() functions to access worker fields.  It may print\ngarbage if something went very wrong, but it wouldn\u0027t cause (another)\noops.\n\nThe description is currently limited to 24bytes including the\nterminating \\0.  worker-\u003edesc_valid and workder-\u003edesc[] are added and\nthe 64 bytes marker which was already incorrect before adding the new\nfields is moved to the correct position.\n\nHere\u0027s an example dump with writeback updated to set the bdi name as\nworker desc.\n\n Hardware name: Bochs\n Modules linked in:\n Pid: 7, comm: kworker/u9:0 Not tainted 3.9.0-rc1-work+ #1\n Workqueue: writeback bdi_writeback_workfn (flush-8:0)\n  ffffffff820a3ab0 ffff88000f6e9cb8 ffffffff81c61845 ffff88000f6e9cf8\n  ffffffff8108f50f 0000000000000000 0000000000000000 ffff88000cde16b0\n  ffff88000cde1aa8 ffff88001ee19240 ffff88000f6e9fd8 ffff88000f6e9d08\n Call Trace:\n  [\u003cffffffff81c61845\u003e] dump_stack+0x19/0x1b\n  [\u003cffffffff8108f50f\u003e] warn_slowpath_common+0x7f/0xc0\n  [\u003cffffffff8108f56a\u003e] warn_slowpath_null+0x1a/0x20\n  [\u003cffffffff81200150\u003e] bdi_writeback_workfn+0x2a0/0x3b0\n ...\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nAcked-by: Jan Kara \u003cjack@suse.cz\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nCc: Dave Chinner \u003cdavid@fromorbit.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "cece95dfe5aa56ba99e51b4746230ff0b8542abd",
      "tree": "32ceba3269028558bf3d66592f3054746459a0c2",
      "parents": [
        "5c529597e922c26910fe49b8d5f93aeaca9a2415"
      ],
      "author": {
        "name": "Wei Yongjun",
        "email": "yongjun_wei@trendmicro.com.cn",
        "time": "Tue Apr 09 14:29:11 2013 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Apr 09 11:33:40 2013 -0700"
      },
      "message": "workqueue: use kmem_cache_free() instead of kfree()\n\nmemory allocated by kmem_cache_alloc() should be freed using\nkmem_cache_free(), not kfree().\n\nSigned-off-by: Wei Yongjun \u003cyongjun_wei@trendmicro.com.cn\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "5c529597e922c26910fe49b8d5f93aeaca9a2415",
      "tree": "76da2d5ce97f35db5bfb1fef8610a8422713672d",
      "parents": [
        "229641a6f1f09e27a1f12fba38980f33f4c92975"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Thu Apr 04 10:05:38 2013 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Apr 04 07:54:01 2013 -0700"
      },
      "message": "workqueue: avoid false negative WARN_ON() in destroy_workqueue()\n\ndestroy_workqueue() performs several sanity checks before proceeding\nwith destruction of a workqueue.  One of the checks verifies that\nrefcnt of each pwq (pool_workqueue) is over 1 as at that point there\nshould be no in-flight work items and the only holder of pwq refs is\nthe workqueue itself.\n\nThis worked fine as a workqueue used to hold only one reference to its\npwqs; however, since 4c16bd327c (\"workqueue: implement NUMA affinity\nfor unbound workqueues\"), a workqueue may hold multiple references to\nits default pwq triggering this sanity check spuriously.\n\nFix it by not triggering the pwq-\u003erefcnt assertion on default pwqs.\n\nAn example spurious WARN trigger follows.\n\n WARNING: at kernel/workqueue.c:4201 destroy_workqueue+0x6a/0x13e()\n Hardware name: 4286C12\n Modules linked in: sdhci_pci sdhci mmc_core usb_storage i915 drm_kms_helper drm i2c_algo_bit i2c_core video\n Pid: 361, comm: umount Not tainted 3.9.0-rc5+ #29\n Call Trace:\n  [\u003cc04314a7\u003e] warn_slowpath_common+0x7c/0x93\n  [\u003cc04314e0\u003e] warn_slowpath_null+0x22/0x24\n  [\u003cc044796a\u003e] destroy_workqueue+0x6a/0x13e\n  [\u003cc056dc01\u003e] ext4_put_super+0x43/0x2c4\n  [\u003cc04fb7b8\u003e] generic_shutdown_super+0x4b/0xb9\n  [\u003cc04fb848\u003e] kill_block_super+0x22/0x60\n  [\u003cc04fb960\u003e] deactivate_locked_super+0x2f/0x56\n  [\u003cc04fc41b\u003e] deactivate_super+0x2e/0x31\n  [\u003cc050f1e6\u003e] mntput_no_expire+0x103/0x108\n  [\u003cc050fdce\u003e] sys_umount+0x2a2/0x2c4\n  [\u003cc050fe0e\u003e] sys_oldumount+0x1e/0x20\n  [\u003cc085ba4d\u003e] sysenter_do_call+0x12/0x38\n\ntj: Rewrote description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\n"
    },
    {
      "commit": "229641a6f1f09e27a1f12fba38980f33f4c92975",
      "tree": "234a6f8aea0910de3242af0bbe6d7494fcf81847",
      "parents": [
        "d55262c4d164759a8debe772da6c9b16059dec47",
        "07961ac7c0ee8b546658717034fe692fd12eefa9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 17:08:13 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 18:45:36 2013 -0700"
      },
      "message": "Merge tag \u0027v3.9-rc5\u0027 into wq/for-3.10\n\nWriteback conversion to workqueue will be based on top of wq/for-3.10\nbranch to take advantage of custom attrs and NUMA support for unbound\nworkqueues.  Mainline currently contains two commits which result in\nnon-trivial merge conflicts with wq/for-3.10 and because\nblock/for-3.10/core is based on v3.9-rc3 which contains one of the\nconflicting commits, we need a pre-merge-window merge anyway.  Let\u0027s\npull v3.9-rc5 into wq/for-3.10 so that the block tree doesn\u0027t suffer\nfrom workqueue merge conflicts.\n\nThe two conflicts and their resolutions:\n\n* e68035fb65 (\"workqueue: convert to idr_alloc()\") in mainline changes\n  worker_pool_assign_id() to use idr_alloc() instead of the old idr\n  interface.  worker_pool_assign_id() goes through multiple locking\n  changes in wq/for-3.10 causing the following conflict.\n\n  static int worker_pool_assign_id(struct worker_pool *pool)\n  {\n\t  int ret;\n\n  \u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\t  lockdep_assert_held(\u0026wq_pool_mutex);\n\n\t  do {\n\t\t  if (!idr_pre_get(\u0026worker_pool_idr, GFP_KERNEL))\n\t\t\t  return -ENOMEM;\n\t\t  ret \u003d idr_get_new(\u0026worker_pool_idr, pool, \u0026pool-\u003eid);\n\t  } while (ret \u003d\u003d -EAGAIN);\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\t  mutex_lock(\u0026worker_pool_idr_mutex);\n\t  ret \u003d idr_alloc(\u0026worker_pool_idr, pool, 0, 0, GFP_KERNEL);\n\t  if (ret \u003e\u003d 0)\n\t\t  pool-\u003eid \u003d ret;\n\t  mutex_unlock(\u0026worker_pool_idr_mutex);\n  \u003e\u003e\u003e\u003e\u003e\u003e\u003e c67bf5361e7e66a0ff1f4caf95f89347d55dfb89\n\n\t  return ret \u003c 0 ? ret : 0;\n  }\n\n  We want locking from the former and idr_alloc() usage from the\n  latter, which can be combined to the following.\n\n  static int worker_pool_assign_id(struct worker_pool *pool)\n  {\n\t  int ret;\n\n\t  lockdep_assert_held(\u0026wq_pool_mutex);\n\n\t  ret \u003d idr_alloc(\u0026worker_pool_idr, pool, 0, 0, GFP_KERNEL);\n\t  if (ret \u003e\u003d 0) {\n\t\t  pool-\u003eid \u003d ret;\n\t\t  return 0;\n\t  }\n\t  return ret;\n   }\n\n* eb2834285c (\"workqueue: fix possible pool stall bug in\n  wq_unbind_fn()\") updated wq_unbind_fn() such that it has single\n  larger for_each_std_worker_pool() loop instead of two separate loops\n  with a schedule() call inbetween.  wq/for-3.10 renamed\n  pool-\u003eassoc_mutex to pool-\u003emanager_mutex causing the following\n  conflict (earlier function body and comments omitted for brevity).\n\n  static void wq_unbind_fn(struct work_struct *work)\n  {\n  ...\n\t\t  spin_unlock_irq(\u0026pool-\u003elock);\n  \u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\t\t  mutex_unlock(\u0026pool-\u003emanager_mutex);\n\t  }\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\t\t  mutex_unlock(\u0026pool-\u003eassoc_mutex);\n  \u003e\u003e\u003e\u003e\u003e\u003e\u003e c67bf5361e7e66a0ff1f4caf95f89347d55dfb89\n\n\t\t  schedule();\n\n  \u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n\t  for_each_cpu_worker_pool(pool, cpu)\n  \u003d\u003d\u003d\u003d\u003d\u003d\u003d\n  \u003e\u003e\u003e\u003e\u003e\u003e\u003e c67bf5361e7e66a0ff1f4caf95f89347d55dfb89\n\t\t  atomic_set(\u0026pool-\u003enr_running, 0);\n\n\t\t  spin_lock_irq(\u0026pool-\u003elock);\n\t\t  wake_up_worker(pool);\n\t\t  spin_unlock_irq(\u0026pool-\u003elock);\n\t  }\n  }\n\n  The resolution is mostly trivial.  We want the control flow of the\n  latter with the rename of the former.\n\n  static void wq_unbind_fn(struct work_struct *work)\n  {\n  ...\n\t\t  spin_unlock_irq(\u0026pool-\u003elock);\n\t\t  mutex_unlock(\u0026pool-\u003emanager_mutex);\n\n\t\t  schedule();\n\n\t\t  atomic_set(\u0026pool-\u003enr_running, 0);\n\n\t\t  spin_lock_irq(\u0026pool-\u003elock);\n\t\t  wake_up_worker(pool);\n\t\t  spin_unlock_irq(\u0026pool-\u003elock);\n\t  }\n  }\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "d55262c4d164759a8debe772da6c9b16059dec47",
      "tree": "2dffae0287567802a05e3290048195ea277d22ae",
      "parents": [
        "4c16bd327c74d6678858706211a0c6e4e53eb3e6"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:38 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:38 2013 -0700"
      },
      "message": "workqueue: update sysfs interface to reflect NUMA awareness and a kernel param to disable NUMA affinity\n\nUnbound workqueues are now NUMA aware.  Let\u0027s add some control knobs\nand update sysfs interface accordingly.\n\n* Add kernel param workqueue.numa_disable which disables NUMA affinity\n  globally.\n\n* Replace sysfs file \"pool_id\" with \"pool_ids\" which contain\n  node:pool_id pairs.  This change is userland-visible but \"pool_id\"\n  hasn\u0027t seen a release yet, so this is okay.\n\n* Add a new sysf files \"numa\" which can toggle NUMA affinity on\n  individual workqueues.  This is implemented as attrs-\u003eno_numa whichn\n  is special in that it isn\u0027t part of a pool\u0027s attributes.  It only\n  affects how apply_workqueue_attrs() picks which pools to use.\n\nAfter \"pool_ids\" change, first_pwq() doesn\u0027t have any user left.\nRemoved.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "4c16bd327c74d6678858706211a0c6e4e53eb3e6",
      "tree": "aa14cf2c9ed0a95e8e0deea60e4464dcd55d1289",
      "parents": [
        "dce90d47c4288c7d3c1988bebb059ea7451d5fd5"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:36 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:36 2013 -0700"
      },
      "message": "workqueue: implement NUMA affinity for unbound workqueues\n\nCurrently, an unbound workqueue has single current, or first, pwq\n(pool_workqueue) to which all new work items are queued.  This often\nisn\u0027t optimal on NUMA machines as workers may jump around across node\nboundaries and work items get assigned to workers without any regard\nto NUMA affinity.\n\nThis patch implements NUMA affinity for unbound workqueues.  Instead\nof mapping all entries of numa_pwq_tbl[] to the same pwq,\napply_workqueue_attrs() now creates a separate pwq covering the\nintersecting CPUs for each NUMA node which has online CPUs in\n@attrs-\u003ecpumask.  Nodes which don\u0027t have intersecting possible CPUs\nare mapped to pwqs covering whole @attrs-\u003ecpumask.\n\nAs CPUs come up and go down, the pool association is changed\naccordingly.  Changing pool association may involve allocating new\npools which may fail.  To avoid failing CPU_DOWN, each workqueue\nalways keeps a default pwq which covers whole attrs-\u003ecpumask which is\nused as fallback if pool creation fails during a CPU hotplug\noperation.\n\nThis ensures that all work items issued on a NUMA node is executed on\nthe same node as long as the workqueue allows execution on the CPUs of\nthe node.\n\nAs this maps a workqueue to multiple pwqs and max_active is per-pwq,\nthis change the behavior of max_active.  The limit is now per NUMA\nnode instead of global.  While this is an actual change, max_active is\nalready per-cpu for per-cpu workqueues and primarily used as safety\nmechanism rather than for active concurrency control.  Concurrency is\nusually limited from workqueue users by the number of concurrently\nactive work items and this change shouldn\u0027t matter much.\n\nv2: Fixed pwq freeing in apply_workqueue_attrs() error path.  Spotted\n    by Lai.\n\nv3: The previous version incorrectly made a workqueue spanning\n    multiple nodes spread work items over all online CPUs when some of\n    its nodes don\u0027t have any desired cpus.  Reimplemented so that NUMA\n    affinity is properly updated as CPUs go up and down.  This problem\n    was spotted by Lai Jiangshan.\n\nv4: destroy_workqueue() was putting wq-\u003edfl_pwq and then clearing it;\n    however, wq may be freed at any time after dfl_pwq is put making\n    the clearing use-after-free.  Clear wq-\u003edfl_pwq before putting it.\n\nv5: apply_workqueue_attrs() was leaking @tmp_attrs, @new_attrs and\n    @pwq_tbl after success.  Fixed.\n\n    Retry loop in wq_update_unbound_numa_attrs() isn\u0027t necessary as\n    application of new attrs is excluded via CPU hotplug.  Removed.\n\n    Documentation on CPU affinity guarantee on CPU_DOWN added.\n\n    All changes are suggested by Lai Jiangshan.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "dce90d47c4288c7d3c1988bebb059ea7451d5fd5",
      "tree": "636f36bd20d7aba953b28346f927be5cf33ea055",
      "parents": [
        "1befcf3073fa083e7dc48c384ce06f3bd900f514"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "message": "workqueue: introduce put_pwq_unlocked()\n\nFactor out lock pool, put_pwq(), unlock sequence into\nput_pwq_unlocked().  The two existing places are converted and there\nwill be more with NUMA affinity support.\n\nThis is to prepare for NUMA affinity support for unbound workqueues\nand doesn\u0027t introduce any functional difference.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "1befcf3073fa083e7dc48c384ce06f3bd900f514",
      "tree": "d5ca2582430566d6f5577abbe19360afebba8ecc",
      "parents": [
        "e50aba9aea63b7617887b4d9694184f478731c82"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "message": "workqueue: introduce numa_pwq_tbl_install()\n\nFactor out pool_workqueue linking and installation into numa_pwq_tbl[]\nfrom apply_workqueue_attrs() into numa_pwq_tbl_install().  link_pwq()\nis made safe to call multiple times.  numa_pwq_tbl_install() links the\npwq, installs it into numa_pwq_tbl[] at the specified node and returns\nthe old entry.\n\n@last_pwq is removed from link_pwq() as the return value of the new\nfunction can be used instead.\n\nThis is to prepare for NUMA affinity support for unbound workqueues.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "e50aba9aea63b7617887b4d9694184f478731c82",
      "tree": "68649f81762c3088c535d3bdb4743c2d96f6c7eb",
      "parents": [
        "f147f29eb7c4959e5f8be604ce2d23979c86378c"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "message": "workqueue: use NUMA-aware allocation for pool_workqueues\n\nUse kmem_cache_alloc_node() with @pool-\u003enode instead of\nkmem_cache_zalloc() when allocating a pool_workqueue so that it\u0027s\nallocated on the same node as the associated worker_pool.  As there\u0027s\nno no kmem_cache_zalloc_node(), move zeroing to init_pwq().\n\nThis was suggested by Lai Jiangshan.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "f147f29eb7c4959e5f8be604ce2d23979c86378c",
      "tree": "ed650b77760d1989668342b1d4fd52febaf76c20",
      "parents": [
        "df2d5ae4995b3fb9392b6089b9623d20b6c3a542"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "message": "workqueue: break init_and_link_pwq() into two functions and introduce alloc_unbound_pwq()\n\nBreak init_and_link_pwq() into init_pwq() and link_pwq() and move\nunbound-workqueue specific handling into apply_workqueue_attrs().\nAlso, factor out unbound pool and pool_workqueue allocation into\nalloc_unbound_pwq().\n\nThis reorganization is to prepare for NUMA affinity and doesn\u0027t\nintroduce any functional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "df2d5ae4995b3fb9392b6089b9623d20b6c3a542",
      "tree": "e3ff31bbf78f19b1094b78d8039a898466643f27",
      "parents": [
        "2728fd2f098c3cc5efaf3f0433855e579d5e4f28"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "message": "workqueue: map an unbound workqueues to multiple per-node pool_workqueues\n\nCurrently, an unbound workqueue has only one \"current\" pool_workqueue\nassociated with it.  It may have multple pool_workqueues but only the\nfirst pool_workqueue servies new work items.  For NUMA affinity, we\nwant to change this so that there are multiple current pool_workqueues\nserving different NUMA nodes.\n\nIntroduce workqueue-\u003enuma_pwq_tbl[] which is indexed by NUMA node and\npoints to the pool_workqueue to use for each possible node.  This\nreplaces first_pwq() in __queue_work() and workqueue_congested().\n\nnuma_pwq_tbl[] is currently initialized to point to the same\npool_workqueue as first_pwq() so this patch doesn\u0027t make any behavior\nchanges.\n\nv2: Use rcu_dereference_raw() in unbound_pwq_by_node() as the function\n    may be called only with wq-\u003emutex held.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "2728fd2f098c3cc5efaf3f0433855e579d5e4f28",
      "tree": "a5dd0281fa072f669690f5f5e1a77efe32a64ac2",
      "parents": [
        "ecf6881ff349ad8670ec53a7586002d20b5f3b2e"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:35 2013 -0700"
      },
      "message": "workqueue: move hot fields of workqueue_struct to the end\n\nMove wq-\u003eflags and -\u003ecpu_pwqs to the end of workqueue_struct and align\nthem to the cacheline.  These two fields are used in the work item\nissue path and thus hot.  The scheduled NUMA affinity support will add\ndispatch table at the end of workqueue_struct and relocating these two\nfields will allow us hitting only single cacheline on hot paths.\n\nNote that wq-\u003epwqs isn\u0027t moved although it currently is being used in\nthe work item issue path for unbound workqueues.  The dispatch table\nmentioned above will replace its use in the issue path, so it will\nbecome cold once NUMA support is implemented.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "ecf6881ff349ad8670ec53a7586002d20b5f3b2e",
      "tree": "e6e288cf5a0a57377434eb9ad1fd4d0260a6f27a",
      "parents": [
        "6029a91829ad2bd876fed78bc088d3469a9dd777"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:34 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:34 2013 -0700"
      },
      "message": "workqueue: make workqueue-\u003ename[] fixed len\n\nCurrently workqueue-\u003ename[] is of flexible length.  We want to use the\nflexible field for something more useful and there isn\u0027t much benefit\nin allowing arbitrary name length anyway.  Make it fixed len capping\nat 24 bytes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "6029a91829ad2bd876fed78bc088d3469a9dd777",
      "tree": "b5767d17ce0ed6f0ecee7d1b2ad8fcfe753505d9",
      "parents": [
        "f3f90ad46934202eeefac454fd5d89bf73c6aa34"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:34 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:34 2013 -0700"
      },
      "message": "workqueue: add workqueue-\u003eunbound_attrs\n\nCurrently, when exposing attrs of an unbound workqueue via sysfs, the\nworkqueue_attrs of first_pwq() is used as that should equal the\ncurrent state of the workqueue.\n\nThe planned NUMA affinity support will make unbound workqueues make\nuse of multiple pool_workqueues for different NUMA nodes and the above\nassumption will no longer hold.  Introduce workqueue-\u003eunbound_attrs\nwhich records the current attrs in effect and use it for sysfs instead\nof first_pwq()-\u003eattrs.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "f3f90ad46934202eeefac454fd5d89bf73c6aa34",
      "tree": "3780e2ca6be5b8576ba1eda4820b3e13f877af07",
      "parents": [
        "e3c916a4c7f51722785d34d9f9802b70dac3ce93"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:34 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:34 2013 -0700"
      },
      "message": "workqueue: determine NUMA node of workers accourding to the allowed cpumask\n\nWhen worker tasks are created using kthread_create_on_node(),\ncurrently only per-cpu ones have the matching NUMA node specified.\nAll unbound workers are always created with NUMA_NO_NODE.\n\nNow that an unbound worker pool may have an arbitrary cpumask\nassociated with it, this isn\u0027t optimal.  Add pool-\u003enode which is\ndetermined by the pool\u0027s cpumask.  If the pool\u0027s cpumask is contained\ninside a NUMA node proper, the pool is associated with that node, and\nall workers of the pool are created on that node.\n\nThis currently only makes difference for unbound worker pools with\ncpumask contained inside single NUMA node, but this will serve as\nfoundation for making all unbound pools NUMA-affine.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "e3c916a4c7f51722785d34d9f9802b70dac3ce93",
      "tree": "3891075836ae488fa5eb695d5a5dbbdd14eec0fa",
      "parents": [
        "bce903809ab3f29eca97e0be5537778c1689c82b"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:32 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:32 2013 -0700"
      },
      "message": "workqueue: drop \u0027H\u0027 from kworker names of unbound worker pools\n\nCurrently, all workqueue workers which have negative nice value has\n\u0027H\u0027 postfixed to their names.  This is necessary for per-cpu workers\nas they use the CPU number instead of pool-\u003eid to identify the pool\nand the \u0027H\u0027 postfix is the only thing distinguishing normal and\nhighpri workers.\n\nAs workers for unbound pools use pool-\u003eid, the \u0027H\u0027 postfix is purely\ninformational.  TASK_COMM_LEN is 16 and after the static part and\ndelimiters, there are only five characters left for the pool and\nworker IDs.  We\u0027re expecting to have more unbound pools with the\nscheduled NUMA awareness support.  Let\u0027s drop the non-essential \u0027H\u0027\npostfix from unbound kworker name.\n\nWhile at it, restructure kthread_create*() invocation to help future\nNUMA related changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "bce903809ab3f29eca97e0be5537778c1689c82b",
      "tree": "6015d477e4b7a43693ad8b12a6ce3a84781e5ecd",
      "parents": [
        "a892cacc7f4960a39c0fad7bbdf04c5cbf7c229e"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:32 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:32 2013 -0700"
      },
      "message": "workqueue: add wq_numa_tbl_len and wq_numa_possible_cpumask[]\n\nUnbound workqueues are going to be NUMA-affine.  Add wq_numa_tbl_len\nand wq_numa_possible_cpumask[] in preparation.  The former is the\nhighest NUMA node ID + 1 and the latter is masks of possibles CPUs for\neach NUMA node.\n\nThis patch only introduces these.  Future patches will make use of\nthem.\n\nv2: NUMA initialization move into wq_numa_init().  Also, the possible\n    cpumask array is not created if there aren\u0027t multiple nodes on the\n    system.  wq_numa_enabled bool added.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "a892cacc7f4960a39c0fad7bbdf04c5cbf7c229e",
      "tree": "bbc2973a8d16bd643c4033cce6229049ff780e30",
      "parents": [
        "4862125b0256a946d2749a1d5003b0604bc3cb4d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:32 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:32 2013 -0700"
      },
      "message": "workqueue: move pwq_pool_locking outside of get/put_unbound_pool()\n\nThe scheduled NUMA affinity support for unbound workqueues would need\nto walk workqueues list and pool related operations on each workqueue.\n\nMove wq_pool_mutex locking out of get/put_unbound_pool() to their\ncallers so that pool operations can be performed while walking the\nworkqueues list, which is also protected by wq_pool_mutex.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "4862125b0256a946d2749a1d5003b0604bc3cb4d",
      "tree": "0091a7104afb64d1ae7db22b880a8f5975ba2dab",
      "parents": [
        "13e2e556013a543eebd238d1c2759195e3c0c9fc"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:31 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:31 2013 -0700"
      },
      "message": "workqueue: fix memory leak in apply_workqueue_attrs()\n\napply_workqueue_attrs() wasn\u0027t freeing temp attrs variable @new_attrs\nin its success path.  Fix it.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "13e2e556013a543eebd238d1c2759195e3c0c9fc",
      "tree": "ee1aefceeda27e8ede268ce74bd9faf53efbf95c",
      "parents": [
        "bc0caf099d9df4dd0fad24992b043b40541f4200"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:31 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:31 2013 -0700"
      },
      "message": "workqueue: fix unbound workqueue attrs hashing / comparison\n\n29c91e9912b (\"workqueue: implement attribute-based unbound worker_pool\nmanagement\") implemented attrs based worker_pool matching.  It tried\nto avoid false negative when comparing cpumasks with custom hash\nfunction; unfortunately, the hash and comparison functions fail to\nignore CPUs which are not possible.  It incorrectly assumed that\nbitmap_copy() skips leftover bits in the last word of bitmap and\ncpumask_equal() ignores impossible CPUs.\n\nThis patch updates attrs-\u003ecpumask handling such that impossible CPUs\nare properly ignored.\n\n* Hash and copy functions no longer do anything special.  They expect\n  their callers to clear impossible CPUs.\n\n* alloc_workqueue_attrs() initializes the cpumask to cpu_possible_mask\n  instead of setting all bits and explicit cpumask_setall() for\n  unbound_std_wq_attrs[] in init_workqueues() is dropped.\n\n* apply_workqueue_attrs() is now responsible for ignoring impossible\n  CPUs.  It makes a copy of @attrs and clears impossible CPUs before\n  doing anything else.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "bc0caf099d9df4dd0fad24992b043b40541f4200",
      "tree": "dddcccaf93af1eacd1606aadb06105e1a8f5ee11",
      "parents": [
        "b5927605478b740d73192f587e458de1632106e8"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:31 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Apr 01 11:23:31 2013 -0700"
      },
      "message": "workqueue: fix race condition in unbound workqueue free path\n\n8864b4e59 (\"workqueue: implement get/put_pwq()\") implemented pwq\n(pool_workqueue) refcnting which frees workqueue when the last pwq\ngoes away.  It determined whether it was the last pwq by testing\nwq-\u003epwqs is empty.  Unfortunately, the test was done outside wq-\u003emutex\nand multiple pwq release could race and try to free wq multiple times\nleading to oops.\n\nTest wq-\u003epwqs emptiness while holding wq-\u003emutex.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "b5927605478b740d73192f587e458de1632106e8",
      "tree": "368ce931dea72fadb8436385e423df76fb76d0d0",
      "parents": [
        "a357fc03262988f2aa6c4a668b89be22b11ff1e7"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Mar 25 16:57:19 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 25 16:57:19 2013 -0700"
      },
      "message": "workqueue: remove pwq_lock which is no longer used\n\nTo simplify locking, the previous patches expanded wq-\u003emutex to\nprotect all fields of each workqueue instance including the pwqs list\nleaving pwq_lock without any user.  Remove the unused pwq_lock.\n\ntj: Rebased on top of the current dev branch.  Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "a357fc03262988f2aa6c4a668b89be22b11ff1e7",
      "tree": "01a7064d6684ba992bc77cbac6a184497f40110c",
      "parents": [
        "b09f4fd39c0e562aff3682773f4c451d6125048c"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Mar 25 16:57:19 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 25 16:57:19 2013 -0700"
      },
      "message": "workqueue: protect wq-\u003esaved_max_active with wq-\u003emutex\n\nWe\u0027re expanding wq-\u003emutex to cover all fields specific to each\nworkqueue with the end goal of replacing pwq_lock which will make\nlocking simpler and easier to understand.\n\nThis patch makes wq-\u003esaved_max_active protected by wq-\u003emutex instead\nof pwq_lock.  As pwq_lock locking around pwq_adjust_mac_active() is no\nlonger necessary, this patch also replaces pwq_lock lockings of\nfor_each_pwq() around pwq_adjust_max_active() to wq-\u003emutex.\n\ntj: Rebased on top of the current dev branch.  Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "b09f4fd39c0e562aff3682773f4c451d6125048c",
      "tree": "f96b59d02c0136f82c0d280bf6d075d6d0f48f9d",
      "parents": [
        "87fc741e94cf64445c698486982b30afa0811eca"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Mar 25 16:57:18 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 25 16:57:18 2013 -0700"
      },
      "message": "workqueue: protect wq-\u003epwqs and iteration with wq-\u003emutex\n\nWe\u0027re expanding wq-\u003emutex to cover all fields specific to each\nworkqueue with the end goal of replacing pwq_lock which will make\nlocking simpler and easier to understand.\n\ninit_and_link_pwq() and pwq_unbound_release_workfn() already grab\nwq-\u003emutex when adding or removing a pwq from wq-\u003epwqs list.  This\npatch makes it official that the list is wq-\u003emutex protected for\nwrites and updates readers accoridingly.  Explicit IRQ toggles for\nsched-RCU read-locking in flush_workqueue_prep_pwqs() and\ndrain_workqueues() are removed as the surrounding wq-\u003emutex can\nprovide sufficient synchronization.\n\nAlso, assert_rcu_or_pwq_lock() is renamed to assert_rcu_or_wq_mutex()\nand checks for wq-\u003emutex too.\n\npwq_lock locking and assertion are not removed by this patch and a\ncouple of for_each_pwq() iterations are still protected by it.\nThey\u0027ll be removed by future patches.\n\ntj: Rebased on top of the current dev branch.  Updated description.\n    Folded in assert_rcu_or_wq_mutex() renaming from a later patch\n    along with associated comment updates.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "87fc741e94cf64445c698486982b30afa0811eca",
      "tree": "2da27793071072983a69a8808c9c7dad4b0c568b",
      "parents": [
        "3c25a55daadc7e7058926f5728fba7721d824ffb"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Mar 25 16:57:18 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 25 16:57:18 2013 -0700"
      },
      "message": "workqueue: protect wq-\u003enr_drainers and -\u003eflags with wq-\u003emutex\n\nWe\u0027re expanding wq-\u003emutex to cover all fields specific to each\nworkqueue with the end goal of replacing pwq_lock which will make\nlocking simpler and easier to understand.\n\nwq-\u003enr_drainers and -\u003eflags are specific to each workqueue.  Protect\n-\u003enr_drainers and -\u003eflags with wq-\u003emutex instead of pool_mutex.\n\ntj: Rebased on top of the current dev branch.  Updated description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "3c25a55daadc7e7058926f5728fba7721d824ffb",
      "tree": "8182cdfa7db5348c0da0fe100b8abfc8cd32cdf9",
      "parents": [
        "68e13a67ddfb55af386b903ab9ca56358930f79c"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Mar 25 16:57:17 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 25 16:57:17 2013 -0700"
      },
      "message": "workqueue: rename wq-\u003eflush_mutex to wq-\u003emutex\n\nCurrently pwq-\u003eflush_mutex protects many fields of a workqueue\nincluding, especially, the pwqs list.  We\u0027re going to expand this\nmutex to protect most of a workqueue and eventually replace pwq_lock,\nwhich will make locking simpler and easier to understand.\n\nDrop the \"flush_\" prefix in preparation.\n\nThis patch is pure rename.\n\ntj: Rebased on top of the current dev branch.  Updated description.\n    Use WQ: and WR: instead of Q: and QR: for synchronization labels.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "68e13a67ddfb55af386b903ab9ca56358930f79c",
      "tree": "af18d808d1dd843687be794a64149720607d73fb",
      "parents": [
        "519e3c1163ce2b2d510b76b0f5b374198f9378f3"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Mon Mar 25 16:57:17 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 25 16:57:17 2013 -0700"
      },
      "message": "workqueue: rename wq_mutex to wq_pool_mutex\n\nwq-\u003eflush_mutex will be renamed to wq-\u003emutex and cover all fields\nspecific to each workqueue and eventually replace pwq_lock, which will\nmake locking simpler and easier to understand.\n\nRename wq_mutex to wq_pool_mutex to avoid confusion with wq-\u003emutex.\nAfter the scheduled changes, wq_pool_mutex won\u0027t be protecting\nanything specific to each workqueue instance anyway.\n\nThis patch is pure rename.\n\ntj: s/wqs_mutex/wq_pool_mutex/.  Rewrote description.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "519e3c1163ce2b2d510b76b0f5b374198f9378f3",
      "tree": "57fc8b79a3e9a64517a328dd626a4df2b2d0227f",
      "parents": [
        "881094532e2a27406a5f06f839087bd152a8a494"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Mar 20 03:28:21 2013 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 20 11:21:34 2013 -0700"
      },
      "message": "workqueue: avoid false negative in assert_manager_or_pool_lock()\n\nIf lockdep complains something for other subsystem, lockdep_is_held()\ncan be false negative, so we need to also test debug_locks before\ntriggering WARN.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "881094532e2a27406a5f06f839087bd152a8a494",
      "tree": "993b36c51374695056781f6bb01f258aea3e71cc",
      "parents": [
        "951a078a5285ad31bc22e190616ad54b78fac992"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Mar 20 03:28:10 2013 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 20 11:00:57 2013 -0700"
      },
      "message": "workqueue: use rcu_read_lock_sched() instead for accessing pwq in RCU\n\nrcu_read_lock_sched() is better than preempt_disable() if the code is\nprotected by RCU_SCHED.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "951a078a5285ad31bc22e190616ad54b78fac992",
      "tree": "0718bffc99fd05a49f1a3ce86cd01a99e5661c14",
      "parents": [
        "6a092dfd51e5af9b321d683d4b4eddc79e2606ed"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Mar 20 10:52:30 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 20 10:52:30 2013 -0700"
      },
      "message": "workqueue: kick a worker in pwq_adjust_max_active()\n\nIf pwq_adjust_max_active() changes max_active from 0 to\nsaved_max_active, it needs to wakeup worker.  This is already done by\nthaw_workqueues().\n\nIf pwq_adjust_max_active() increases max_active for an unbound wq,\nwhile not strictly necessary for correctness, it\u0027s still desirable to\nwake up a worker so that the requested concurrency level is reached\nsooner.\n\nMove wake_up_worker() call from thaw_workqueues() to\npwq_adjust_max_active() so that it can handle both of the above two\ncases.  This also makes thaw_workqueues() simpler.\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": "6a092dfd51e5af9b321d683d4b4eddc79e2606ed",
      "tree": "1881329dcaa0a35bd2fa6906824d55ebb57f4c74",
      "parents": [
        "12ee4fc67c00895b3d740297f7ca447239c1983b"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Mar 20 03:28:03 2013 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 20 10:40:25 2013 -0700"
      },
      "message": "workqueue: simplify current_is_workqueue_rescuer()\n\nWe can test worker-\u003erecue_wq instead of reaching into\ncurrent_pwq-\u003ewq-\u003erescuer and then comparing it to self.\n\ntj: Commit message.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "12ee4fc67c00895b3d740297f7ca447239c1983b",
      "tree": "a6e57caeada640e5b11100400e5acbec5f28425d",
      "parents": [
        "7dbc725e4749d822eb6dc962526049af1586f041"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Wed Mar 20 03:28:01 2013 +0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 20 10:19:09 2013 -0700"
      },
      "message": "workqueue: add missing POOL_FREEZING\n\nget_unbound_pool() forgot to set POOL_FREEZING if workqueue_freezing\nis set and a new pool could go out of sync with the global freezing\nstate.\n\nFix it by adding POOL_FREEZING if workqueue_freezing.  wq_mutex is\nalready held so no further locking is necessary.  This also removes\nthe unused static variable warning when !CONFIG_FREEZER.\n\ntj: Updated commit message.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "7dbc725e4749d822eb6dc962526049af1586f041",
      "tree": "b102c68e70c38739ce128102fa818f3e91b8056d",
      "parents": [
        "a9ab775bcadf122d91e1a201eb66ae2eec90365a"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "message": "workqueue: restore CPU affinity of unbound workers on CPU_ONLINE\n\nWith the recent addition of the custom attributes support, unbound\npools may have allowed cpumask which isn\u0027t full.  As long as some of\nCPUs in the cpumask are online, its workers will maintain cpus_allowed\nas set on worker creation; however, once no online CPU is left in\ncpus_allowed, the scheduler will reset cpus_allowed of any workers\nwhich get scheduled so that they can execute.\n\nTo remain compliant to the user-specified configuration, CPU affinity\nneeds to be restored when a CPU becomes online for an unbound pool\nwhich doesn\u0027t currently have any online CPUs before.\n\nThis patch implement restore_unbound_workers_cpumask(), which is\ncalled from CPU_ONLINE for all unbound pools, checks whether the\ncoming up CPU is the first allowed online one, and, if so, invokes\nset_cpus_allowed_ptr() with the configured cpumask on all workers.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "a9ab775bcadf122d91e1a201eb66ae2eec90365a",
      "tree": "98f30f2272d2ad62258744a48570c49ecfab66af",
      "parents": [
        "bd7c089eb25b26d2e03fd34f97e5517a4463f871"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "message": "workqueue: directly restore CPU affinity of workers from CPU_ONLINE\n\nRebinding workers of a per-cpu pool after a CPU comes online involves\na lot of back-and-forth mostly because only the task itself could\nadjust CPU affinity if PF_THREAD_BOUND was set.\n\nAs CPU_ONLINE itself couldn\u0027t adjust affinity, it had to somehow\ncoerce the workers themselves to perform set_cpus_allowed_ptr().  Due\nto the various states a worker can be in, this led to three different\npaths a worker may be rebound.  worker-\u003erebind_work is queued to busy\nworkers.  Idle ones are signaled by unlinking worker-\u003eentry and call\nidle_worker_rebind().  The manager isn\u0027t covered by either and\nimplements its own mechanism.\n\nPF_THREAD_BOUND has been relaced with PF_NO_SETAFFINITY and CPU_ONLINE\nitself now can manipulate CPU affinity of workers.  This patch\nreplaces the existing rebind mechanism with direct one where\nCPU_ONLINE iterates over all workers using for_each_pool_worker(),\nrestores CPU affinity, and clears WORKER_UNBOUND.\n\nThere are a couple subtleties.  All bound idle workers should have\ntheir runqueues set to that of the bound CPU; however, if the target\ntask isn\u0027t running, set_cpus_allowed_ptr() just updates the\ncpus_allowed mask deferring the actual migration to when the task\nwakes up.  This is worked around by waking up idle workers after\nrestoring CPU affinity before any workers can become bound.\n\nAnother subtlety is stems from matching @pool-\u003enr_running with the\nnumber of running unbound workers.  While DISASSOCIATED, all workers\nare unbound and nr_running is zero.  As workers become bound again,\nnr_running needs to be adjusted accordingly; however, there is no good\nway to tell whether a given worker is running without poking into\nscheduler internals.  Instead of clearing UNBOUND directly,\nrebind_workers() replaces UNBOUND with another new NOT_RUNNING flag -\nREBOUND, which will later be cleared by the workers themselves while\npreparing for the next round of work item execution.  The only change\nneeded for the workers is clearing REBOUND along with PREP.\n\n* This patch leaves for_each_busy_worker() without any user.  Removed.\n\n* idle_worker_rebind(), busy_worker_rebind_fn(), worker-\u003erebind_work\n  and rebind logic in manager_workers() removed.\n\n* worker_thread() now looks at WORKER_DIE instead of testing whether\n  @worker-\u003eentry is empty to determine whether it needs to do\n  something special as dying is the only special thing now.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "bd7c089eb25b26d2e03fd34f97e5517a4463f871",
      "tree": "17b8a08678910689293e1cf06942f20bea42929c",
      "parents": [
        "822d8405d13931062d653e0c2cc0199ed801b072"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "message": "workqueue: relocate rebind_workers()\n\nrebind_workers() will be reimplemented in a way which makes it mostly\ndecoupled from the rest of worker management.  Move rebind_workers()\nso that it\u0027s located with other CPU hotplug related functions.\n\nThis patch is pure function relocation.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "822d8405d13931062d653e0c2cc0199ed801b072",
      "tree": "388738869c771c58d20bc24d25729fabc0aab171",
      "parents": [
        "14a40ffccd6163bbcd1d6f32b28a88ffe6149fc6"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:21 2013 -0700"
      },
      "message": "workqueue: convert worker_pool-\u003eworker_ida to idr and implement for_each_pool_worker()\n\nMake worker_ida an idr - worker_idr and use it to implement\nfor_each_pool_worker() which will be used to simplify worker rebinding\non CPU_ONLINE.\n\npool-\u003eworker_idr is protected by both pool-\u003emanager_mutex and\npool-\u003elock so that it can be iterated while holding either lock.\n\n* create_worker() allocates ID without installing worker pointer and\n  installs the pointer later using idr_replace().  This is because\n  worker ID is needed when creating the actual task to name it and the\n  new worker shouldn\u0027t be visible to iterations before fully\n  initialized.\n\n* In destroy_worker(), ID removal is moved before kthread_stop().\n  This is again to guarantee that only fully working workers are\n  visible to for_each_pool_worker().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "14a40ffccd6163bbcd1d6f32b28a88ffe6149fc6",
      "tree": "eb61e5bf7b64c3e67f3e33fe6b07fde4ee1d4d43",
      "parents": [
        "2e109a2855bf6cf675a8b74dbd89b6492e8def42"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:20 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 19 13:45:20 2013 -0700"
      },
      "message": "sched: replace PF_THREAD_BOUND with PF_NO_SETAFFINITY\n\nPF_THREAD_BOUND was originally used to mark kernel threads which were\nbound to a specific CPU using kthread_bind() and a task with the flag\nset allows cpus_allowed modifications only to itself.  Workqueue is\ncurrently abusing it to prevent userland from meddling with\ncpus_allowed of workqueue workers.\n\nWhat we need is a flag to prevent userland from messing with\ncpus_allowed of certain kernel tasks.  In kernel, anyone can\n(incorrectly) squash the flag, and, for worker-type usages,\nrestricting cpus_allowed modification to the task itself doesn\u0027t\nprovide meaningful extra proection as other tasks can inject work\nitems to the task anyway.\n\nThis patch replaces PF_THREAD_BOUND with PF_NO_SETAFFINITY.\nsched_setaffinity() checks the flag and return -EINVAL if set.\nset_cpus_allowed_ptr() is no longer affected by the flag.\n\nThis will allow simplifying workqueue worker CPU affinity management.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Ingo Molnar \u003cmingo@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n"
    },
    {
      "commit": "b63dc123b20e54a306ff1bfa191e511c506ee331",
      "tree": "ab7b2b9259bbb1bf9c139e71b94cdfd27c69a9f8",
      "parents": [
        "35f8c769aa5f3d9a81d50e9bdcbfd4151e72a0c9",
        "eb2834285cf172856cd12f66892fc7467935ebed"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 18 18:47:07 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 18 18:47:07 2013 -0700"
      },
      "message": "Merge branch \u0027for-3.9-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq\n\nPull workqueue fix from Tejun Heo:\n \"Lai\u0027s patch to fix highly unlikely but still possible workqueue stall\n  during CPU hotunplug.\"\n\n* \u0027for-3.9-fixes\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:\n  workqueue: fix possible pool stall bug in wq_unbind_fn()\n"
    },
    {
      "commit": "2e109a2855bf6cf675a8b74dbd89b6492e8def42",
      "tree": "22357bb67654f29db07d0f80b83e4e845cbee8c2",
      "parents": [
        "794b18bc8a3f80445e1f85c9c87c74de9575c93a"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "message": "workqueue: rename workqueue_lock to wq_mayday_lock\n\nWith the recent locking updates, the only thing protected by\nworkqueue_lock is workqueue-\u003emaydays list.  Rename workqueue_lock to\nwq_mayday_lock.\n\nThis patch is pure rename.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "794b18bc8a3f80445e1f85c9c87c74de9575c93a",
      "tree": "460e370381780ad497514abc1079f7cd20467ce0",
      "parents": [
        "5bcab3355a555a9c1bd4becb136cbd3651c8eafa"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "message": "workqueue: separate out pool_workqueue locking into pwq_lock\n\nThis patch continues locking cleanup from the previous patch.  It\nbreaks out pool_workqueue synchronization from workqueue_lock into a\nnew spinlock - pwq_lock.  The followings are protected by pwq_lock.\n\n* workqueue-\u003epwqs\n* workqueue-\u003esaved_max_active\n\nThe conversion is straight-forward.  workqueue_lock usages which cover\nthe above two are converted to pwq_lock.  New locking label PW added\nfor things protected by pwq_lock and FR is updated to mean flush_mutex\n+ pwq_lock + sched-RCU.\n\nThis patch shouldn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "5bcab3355a555a9c1bd4becb136cbd3651c8eafa",
      "tree": "21b724b2fdaa0b78a4805cef9267499b61824963",
      "parents": [
        "7d19c5ce6682fd0390049b5340d4b6bb6065d677"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "message": "workqueue: separate out pool and workqueue locking into wq_mutex\n\nCurrently, workqueue_lock protects most shared workqueue resources -\nthe pools, workqueues, pool_workqueues, draining, ID assignments,\nmayday handling and so on.  The coverage has grown organically and\nthere is no identified bottleneck coming from workqueue_lock, but it\nhas grown a bit too much and scheduled rebinding changes need the\npools and workqueues to be protected by a mutex instead of a spinlock.\n\nThis patch breaks out pool and workqueue synchronization from\nworkqueue_lock into a new mutex - wq_mutex.  The followings are\nprotected by wq_mutex.\n\n* worker_pool_idr and unbound_pool_hash\n* pool-\u003erefcnt\n* workqueues list\n* workqueue-\u003eflags, -\u003enr_drainers\n\nMost changes are mostly straight-forward.  workqueue_lock is replaced\nwith wq_mutex where applicable and workqueue_lock lock/unlocks are\nadded where wq_mutex conversion leaves data structures not protected\nby wq_mutex without locking.  irq / preemption flippings were added\nwhere the conversion affects them.  Things worth noting are\n\n* New WQ and WR locking lables added along with\n  assert_rcu_or_wq_mutex().\n\n* worker_pool_assign_id() now expects to be called under wq_mutex.\n\n* create_mutex is removed from get_unbound_pool().  It now just holds\n  wq_mutex.\n\nThis patch shouldn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "7d19c5ce6682fd0390049b5340d4b6bb6065d677",
      "tree": "da5a04e853d217510d044da83891c09a3f3385da",
      "parents": [
        "cd549687a7ee5e619a26f55af4059c4ae585811c"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:40 2013 -0700"
      },
      "message": "workqueue: relocate global variable defs and function decls in workqueue.c\n\nThey\u0027re split across debugobj code for some reason.  Collect them.\n\nThis patch is pure relocation.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "cd549687a7ee5e619a26f55af4059c4ae585811c",
      "tree": "5e24dfb098b57da5c267bef55e6c946c0e320e45",
      "parents": [
        "ebf44d16ec4619c8a8daeacd987dd86d420ea2c3"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:39 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:39 2013 -0700"
      },
      "message": "workqueue: better define locking rules around worker creation / destruction\n\nWhen a manager creates or destroys workers, the operations are always\ndone with the manager_mutex held; however, initial worker creation or\nworker destruction during pool release don\u0027t grab the mutex.  They are\nstill correct as initial worker creation doesn\u0027t require\nsynchronization and grabbing manager_arb provides enough exclusion for\npool release path.\n\nStill, let\u0027s make everyone follow the same rules for consistency and\nsuch that lockdep annotations can be added.\n\nUpdate create_and_start_worker() and put_unbound_pool() to grab\nmanager_mutex around thread creation and destruction respectively and\nadd lockdep assertions to create_worker() and destroy_worker().\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "ebf44d16ec4619c8a8daeacd987dd86d420ea2c3",
      "tree": "501bb8fbeda2ff67d71af733c3c56150053a4351",
      "parents": [
        "bc3a1afc92aea46d6df18d38e5d15867b17c69f6"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:39 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:39 2013 -0700"
      },
      "message": "workqueue: factor out initial worker creation into create_and_start_worker()\n\nget_unbound_pool(), workqueue_cpu_up_callback() and init_workqueues()\nhave similar code pieces to create and start the initial worker factor\nthose out into create_and_start_worker().\n\nThis patch doesn\u0027t introduce any functional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "bc3a1afc92aea46d6df18d38e5d15867b17c69f6",
      "tree": "0436a0916d33ef4b8a9acdaca0584f0a8f935327",
      "parents": [
        "8425e3d5bdbe8e741d2c73cf3189ed59b4038b84"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:39 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 19:47:39 2013 -0700"
      },
      "message": "workqueue: rename worker_pool-\u003eassoc_mutex to -\u003emanager_mutex\n\nManager operations are currently governed by two mutexes -\npool-\u003emanager_arb and -\u003eassoc_mutex.  The former is used to decide who\ngets to be the manager and the latter to exclude the actual manager\noperations including creation and destruction of workers.  Anyone who\ngrabs -\u003emanager_arb must perform manager role; otherwise, the pool\nmight stall.\n\nGrabbing -\u003eassoc_mutex blocks everyone else from performing manager\noperations but doesn\u0027t require the holder to perform manager duties as\nit\u0027s merely blocking manager operations without becoming the manager.\n\nBecause the blocking was necessary when [dis]associating per-cpu\nworkqueues during CPU hotplug events, the latter was named\nassoc_mutex.  The mutex is scheduled to be used for other purposes, so\nthis patch gives it a more fitting generic name - manager_mutex - and\nupdates / adds comments to explain synchronization around the manager\nrole and operations.\n\nThis patch is pure rename / doc update.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8425e3d5bdbe8e741d2c73cf3189ed59b4038b84",
      "tree": "5880573b3804d2b313b0b6b640836e57df63a5e9",
      "parents": [
        "611c92a0203091bb022edec7e2d8b765fe148622"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:36 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:36 2013 -0700"
      },
      "message": "workqueue: inline trivial wrappers\n\nThere\u0027s no reason to make these trivial wrappers full (exported)\nfunctions.  Inline the followings.\n\n queue_work()\n queue_delayed_work()\n mod_delayed_work()\n schedule_work_on()\n schedule_work()\n schedule_delayed_work_on()\n schedule_delayed_work()\n keventd_up()\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "611c92a0203091bb022edec7e2d8b765fe148622",
      "tree": "84b1792c60c547f6d5e08b791fc62b5671a65a58",
      "parents": [
        "c5aa87bbf4b23f5e4f167489406daeb0ed275c47"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:36 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:36 2013 -0700"
      },
      "message": "workqueue: rename @id to @pi in for_each_each_pool()\n\nRename @id argument of for_each_pool() to @pi so that it doesn\u0027t get\nreused accidentally when for_each_pool() is used in combination with\nother iterators.\n\nThis patch is purely cosmetic.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "c5aa87bbf4b23f5e4f167489406daeb0ed275c47",
      "tree": "c0a8218033a0dd61fb840cbd300287405043ba70",
      "parents": [
        "983ca25e738ee0c9c5435a503a6bb0034d4552b0"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:36 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:36 2013 -0700"
      },
      "message": "workqueue: update comments and a warning message\n\n* Update incorrect and add missing synchronization labels.\n\n* Update incorrect or misleading comments.  Add new comments where\n  clarification is necessary.  Reformat / rephrase some comments.\n\n* drain_workqueue() can be used separately from destroy_workqueue()\n  but its warning message was incorrectly referring to destruction.\n\nOther than the warning message change, this patch doesn\u0027t make any\nfunctional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "983ca25e738ee0c9c5435a503a6bb0034d4552b0",
      "tree": "24d945cc7c5476220f5d7c3a1fefddbc2f056373",
      "parents": [
        "699ce097efe8f45bc5c055e4f12cb1e271c270d9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:35 2013 -0700"
      },
      "message": "workqueue: fix max_active handling in init_and_link_pwq()\n\nSince 9e8cd2f589 (\"workqueue: implement apply_workqueue_attrs()\"),\ninit_and_link_pwq() may be called to initialize a new pool_workqueue\nfor a workqueue which is already online, but the function was setting\npwq-\u003emax_active to wq-\u003esaved_max_active without proper\nsynchronization.\n\nFix it by calling pwq_adjust_max_active() under proper locking instead\nof manually setting max_active.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "699ce097efe8f45bc5c055e4f12cb1e271c270d9",
      "tree": "db116c908ed97eaf621c4dc99a4896acd51e56a2",
      "parents": [
        "0fbd95aa8a056194933fba4ae78c50fc20f0704e"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:35 2013 -0700"
      },
      "message": "workqueue: implement and use pwq_adjust_max_active()\n\nRename pwq_set_max_active() to pwq_adjust_max_active() and move\npool_workqueue-\u003emax_active synchronization and max_active\ndetermination logic into it.\n\nThe new function should be called with workqueue_lock held for stable\nworkqueue-\u003esaved_max_active, determines the current max_active value\nthe target pool_workqueue should be using from @wq-\u003esaved_max_active\nand the state of the associated pool, and applies it with proper\nsynchronization.\n\nThe current two users - workqueue_set_max_active() and\nthaw_workqueues() - are updated accordingly.  In addition, the manual\nfreezing handling in __alloc_workqueue_key() and\nfreeze_workqueues_begin() are replaced with calls to\npwq_adjust_max_active().\n\nThis centralizes max_active handling so that it\u0027s less error-prone.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "0fbd95aa8a056194933fba4ae78c50fc20f0704e",
      "tree": "f9f092a3f5268dbb30c1b233f51917b81c452008",
      "parents": [
        "e62676169118bc2d42e5008b3f8872646313f077"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:35 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 16:51:35 2013 -0700"
      },
      "message": "workqueue: relocate pwq_set_max_active()\n\npwq_set_max_active() is gonna be modified and used during\npool_workqueue init.  Move it above init_and_link_pwq().\n\nThis patch is pure code reorganization and doesn\u0027t introduce any\nfunctional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "e68035fb65dec05718d765fbea14d2e527214ff6",
      "tree": "53705b53e6df80b1fd91145cc2f09adfa75a29ae",
      "parents": [
        "ebd6c70714f5eda9cd1b60d23754ffd1d62481f6"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Mar 13 14:59:38 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 13 15:21:46 2013 -0700"
      },
      "message": "workqueue: convert to idr_alloc()\n\nidr_get_new*() and friends are about to be deprecated.  Convert to the\nnew idr_alloc() interface.\n\nSigned-off-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": "e62676169118bc2d42e5008b3f8872646313f077",
      "tree": "98ce7e6b03a8a18fa322de7997248a8e0b7b2f84",
      "parents": [
        "226223ab3c4118ddd10688cc2c131135848371ab"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 17:41:37 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 17:42:01 2013 -0700"
      },
      "message": "workqueue: implement current_is_workqueue_rescuer()\n\nImplement a function which queries whether it currently is running off\na workqueue rescuer.  This will be used to convert writeback to\nworkqueue.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "226223ab3c4118ddd10688cc2c131135848371ab",
      "tree": "050da70ca30d34cbc9e21f628935e020c4106894",
      "parents": [
        "36b519dfc7b57b8f91940a6e346d9a248e501e0d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:05 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:37:07 2013 -0700"
      },
      "message": "workqueue: implement sysfs interface for workqueues\n\nThere are cases where workqueue users want to expose control knobs to\nuserland.  e.g. Unbound workqueues with custom attributes are\nscheduled to be used for writeback workers and depending on\nconfiguration it can be useful to allow admins to tinker with the\npriority or allowed CPUs.\n\nThis patch implements workqueue_sysfs_register(), which makes the\nworkqueue visible under /sys/bus/workqueue/devices/WQ_NAME.  There\ncurrently are two attributes common to both per-cpu and unbound pools\nand extra attributes for unbound pools including nice level and\ncpumask.\n\nIf alloc_workqueue*() is called with WQ_SYSFS,\nworkqueue_sysfs_register() is called automatically as part of\nworkqueue creation.  This is the preferred method unless the workqueue\nuser wants to apply workqueue_attrs before making the workqueue\nvisible to userland.\n\nv2: Disallow exposing ordered workqueues as ordered workqueues can\u0027t\n    be tuned in any way.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8719dceae2f98a578507c0f6b49c93f320bd729c",
      "tree": "3132f4c6ed84ec893bcad3aaec230fa78cede95d",
      "parents": [
        "618b01eb426dd2d73a4b5e5ebc6379e4eee3b123"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: reject adjusting max_active or applying attrs to ordered workqueues\n\nAdjusting max_active of or applying new workqueue_attrs to an ordered\nworkqueue breaks its ordering guarantee.  The former is obvious.  The\nlatter is because applying attrs creates a new pwq (pool_workqueue)\nand there is no ordering constraint between the old and new pwqs.\n\nMake apply_workqueue_attrs() and workqueue_set_max_active() trigger\nWARN_ON() if those operations are requested on an ordered workqueue\nand fail / ignore respectively.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "618b01eb426dd2d73a4b5e5ebc6379e4eee3b123",
      "tree": "9068381e7a25dde3d4d72fd8b9fe8a814bc85efe",
      "parents": [
        "9e8cd2f5898ab6710ad81f4583fada08bf8049a4"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: make it clear that WQ_DRAINING is an internal flag\n\nWe\u0027re gonna add another internal WQ flag.  Let\u0027s make the distinction\nclear.  Prefix WQ_DRAINING with __ and move it to bit 16.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "9e8cd2f5898ab6710ad81f4583fada08bf8049a4",
      "tree": "bb3950d07a5e23be7817eaaa0517066b7d5f82fb",
      "parents": [
        "c9178087acd71b4ea010ea48e147cf66952d2da9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: implement apply_workqueue_attrs()\n\nImplement apply_workqueue_attrs() which applies workqueue_attrs to the\nspecified unbound workqueue by creating a new pwq (pool_workqueue)\nlinked to worker_pool with the specified attributes.\n\nA new pwq is linked at the head of wq-\u003epwqs instead of tail and\n__queue_work() verifies that the first unbound pwq has positive refcnt\nbefore choosing it for the actual queueing.  This is to cover the case\nwhere creation of a new pwq races with queueing.  As base ref on a pwq\nwon\u0027t be dropped without making another pwq the first one,\n__queue_work() is guaranteed to make progress and not add work item to\na dead pwq.\n\ninit_and_link_pwq() is updated to return the last first pwq the new\npwq replaced, which is put by apply_workqueue_attrs().\n\nNote that apply_workqueue_attrs() is almost identical to unbound pwq\npart of alloc_and_link_pwqs().  The only difference is that there is\nno previous first pwq.  apply_workqueue_attrs() is implemented to\nhandle such cases and replaces unbound pwq handling in\nalloc_and_link_pwqs().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "c9178087acd71b4ea010ea48e147cf66952d2da9",
      "tree": "0b226a810036ee110d0f894c821df50df64db29b",
      "parents": [
        "75ccf5950f828d53aebfd3a852283a00abf2c5bf"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: perform non-reentrancy test when queueing to unbound workqueues too\n\nBecause per-cpu workqueues have multiple pwqs (pool_workqueues) to\nserve the CPUs, to guarantee that a single work item isn\u0027t queued on\none pwq while still executing another, __queue_work() takes a look at\nthe previous pool the target work item was on and if it\u0027s still\nexecuting there, queue the work item on that pool.\n\nTo support changing workqueue_attrs on the fly, unbound workqueues too\nwill have multiple pwqs and thus need non-reentrancy test when\nqueueing.  This patch modifies __queue_work() such that the reentrancy\ntest is performed regardless of the workqueue type.\n\nper_cpu_ptr(wq-\u003ecpu_pwqs, cpu) used to be used to determine the\nmatching pwq for the last pool.  This can\u0027t be used for unbound\nworkqueues and is replaced with worker-\u003ecurrent_pwq which also happens\nto be simpler.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "75ccf5950f828d53aebfd3a852283a00abf2c5bf",
      "tree": "3a2085d3deec15d600cfed31107164d92600e078",
      "parents": [
        "8864b4e59f7945a636eeb27671f10486149be6e6"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: prepare flush_workqueue() for dynamic creation and destrucion of unbound pool_workqueues\n\nUnbound pwqs (pool_workqueues) will be dynamically created and\ndestroyed with the scheduled unbound workqueue w/ custom attributes\nsupport.  This patch synchronizes pwq linking and unlinking against\nflush_workqueue() so that its operation isn\u0027t disturbed by pwqs coming\nand going.\n\nLinking and unlinking a pwq into wq-\u003epwqs is now protected also by\nwq-\u003eflush_mutex and a new pwq\u0027s work_color is initialized to\nwq-\u003ework_color during linking.  This ensures that pwqs changes don\u0027t\ndisturb flush_workqueue() in progress and the new pwq\u0027s work coloring\nstays in sync with the rest of the workqueue.\n\nflush_mutex during unlinking isn\u0027t strictly necessary but it\u0027s simpler\nto do it anyway.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "8864b4e59f7945a636eeb27671f10486149be6e6",
      "tree": "74382658daf648a612e0bda94cb161cac84f0523",
      "parents": [
        "d2c1d40487bb1884be085c187233084f80df052d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: implement get/put_pwq()\n\nAdd pool_workqueue-\u003erefcnt along with get/put_pwq().  Both per-cpu and\nunbound pwqs have refcnts and any work item inserted on a pwq\nincrements the refcnt which is dropped when the work item finishes.\n\nFor per-cpu pwqs the base ref is never dropped and destroy_workqueue()\nfrees the pwqs as before.  For unbound ones, destroy_workqueue()\nsimply drops the base ref on the first pwq.  When the refcnt reaches\nzero, pwq_unbound_release_workfn() is scheduled on system_wq, which\nunlinks the pwq, puts the associated pool and frees the pwq and wq as\nnecessary.  This needs to be done from a work item as put_pwq() needs\nto be protected by pool-\u003elock but release can\u0027t happen with the lock\nheld - e.g. put_unbound_pool() involves blocking operations.\n\nUnbound pool-\u003elocks are marked with lockdep subclas 1 as put_pwq()\nwill schedule the release work item on system_wq while holding the\nunbound pool\u0027s lock and triggers recursive locking warning spuriously.\n\nThis will be used to implement dynamic creation and destruction of\nunbound pwqs.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "d2c1d40487bb1884be085c187233084f80df052d",
      "tree": "11ea6d2f331ed75935d0e65643d657f74278d881",
      "parents": [
        "493008a8e475771a2126e0ce95a73e35b371d277"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:04 2013 -0700"
      },
      "message": "workqueue: restructure __alloc_workqueue_key()\n\n* Move initialization and linking of pool_workqueues into\n  init_and_link_pwq().\n\n* Make the failure path use destroy_workqueue() once pool_workqueue\n  initialization succeeds.\n\nThese changes are to prepare for dynamic management of pool_workqueues\nand don\u0027t introduce any functional changes.\n\nWhile at it, convert list_del(\u0026wq-\u003elist) to list_del_init() as a\nprecaution as scheduled changes will make destruction more complex.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "493008a8e475771a2126e0ce95a73e35b371d277",
      "tree": "0e67b51ade42bb623456aa186cec7a5722a8420c",
      "parents": [
        "ac6104cdf87cc162b0a0d78280d1dcb9752e25bb"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "message": "workqueue: drop WQ_RESCUER and test workqueue-\u003erescuer for NULL instead\n\nWQ_RESCUER is superflous.  WQ_MEM_RECLAIM indicates that the user\nwants a rescuer and testing wq-\u003erescuer for NULL can answer whether a\ngiven workqueue has a rescuer or not.  Drop WQ_RESCUER and test\nwq-\u003erescuer directly.\n\nThis will help simplifying __alloc_workqueue_key() failure path by\nallowing it to use destroy_workqueue() on a partially constructed\nworkqueue, which in turn will help implementing dynamic management of\npool_workqueues.\n\nWhile at it, clear wq-\u003erescuer after freeing it in\ndestroy_workqueue().  This is a precaution as scheduled changes will\nmake destruction more complex.\n\nThis patch doesn\u0027t introduce any functional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "ac6104cdf87cc162b0a0d78280d1dcb9752e25bb",
      "tree": "dd62f586800cd7e0eb491469eaba763316c3f1cd",
      "parents": [
        "f02ae73aaa4f285199683862ac59972877a11c5d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "message": "workqueue: add pool ID to the names of unbound kworkers\n\nThere are gonna be multiple unbound pools.  Include pool ID in the\nname of unbound kworkers.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "f02ae73aaa4f285199683862ac59972877a11c5d",
      "tree": "ca517312e1ed5bfaff9b18ebefcd8faf064ad040",
      "parents": [
        "7a62c2c87e3bc174fe4b9e9720e148427510fcfb"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "message": "workqueue: drop \"std\" from cpu_std_worker_pools and for_each_std_worker_pool()\n\nAll per-cpu pools are standard, so there\u0027s no need to use both \"cpu\"\nand \"std\" and for_each_std_worker_pool() is confusing in that it can\nbe used only for per-cpu pools.\n\n* s/cpu_std_worker_pools/cpu_worker_pools/\n\n* s/for_each_std_worker_pool()/for_each_cpu_worker_pool()/\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "7a62c2c87e3bc174fe4b9e9720e148427510fcfb",
      "tree": "9da41de39c7d55d0b54250eadb2980d12e1e825d",
      "parents": [
        "29c91e9912bed7060df6116af90286500f5a700d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "message": "workqueue: remove unbound_std_worker_pools[] and related helpers\n\nWorkqueue no longer makes use of unbound_std_worker_pools[].  All\nunbound worker_pools are created dynamically and there\u0027s nothing\nspecial about the standard ones.  With unbound_std_worker_pools[]\nunused, workqueue no longer has places where it needs to treat the\nper-cpu pools-cpu and unbound pools together.\n\nRemove unbound_std_worker_pools[] and the helpers wrapping it to\npresent unified per-cpu and unbound standard worker_pools.\n\n* for_each_std_worker_pool() now only walks through per-cpu pools.\n\n* for_each[_online]_wq_cpu() which don\u0027t have any users left are\n  removed.\n\n* std_worker_pools() and std_worker_pool_pri() are unused and removed.\n\n* get_std_worker_pool() is removed.  Its only user -\n  alloc_and_link_pwqs() - only used it for per-cpu pools anyway.  Open\n  code per_cpu access in alloc_and_link_pwqs() instead.\n\nThis patch doesn\u0027t introduce any functional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "29c91e9912bed7060df6116af90286500f5a700d",
      "tree": "f5de35e3da85b2f90bda13f7bfb5ea98fbd4d86d",
      "parents": [
        "7a4e344c5675eefbde93ed9a98ef45e0e4957bc2"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:03 2013 -0700"
      },
      "message": "workqueue: implement attribute-based unbound worker_pool management\n\nThis patch makes unbound worker_pools reference counted and\ndynamically created and destroyed as workqueues needing them come and\ngo.  All unbound worker_pools are hashed on unbound_pool_hash which is\nkeyed by the content of worker_pool-\u003eattrs.\n\nWhen an unbound workqueue is allocated, get_unbound_pool() is called\nwith the attributes of the workqueue.  If there already is a matching\nworker_pool, the reference count is bumped and the pool is returned.\nIf not, a new worker_pool with matching attributes is created and\nreturned.\n\nWhen an unbound workqueue is destroyed, put_unbound_pool() is called\nwhich decrements the reference count of the associated worker_pool.\nIf the refcnt reaches zero, the worker_pool is destroyed in sched-RCU\nsafe way.\n\nNote that the standard unbound worker_pools - normal and highpri ones\nwith no specific cpumask affinity - are no longer created explicitly\nduring init_workqueues().  init_workqueues() only initializes\nworkqueue_attrs to be used for standard unbound pools -\nunbound_std_wq_attrs[].  The pools are spawned on demand as workqueues\nare created.\n\nv2: - Comment added to init_worker_pool() explaining that @pool should\n      be in a condition which can be passed to put_unbound_pool() even\n      on failure.\n\n    - pool-\u003erefcnt reaching zero and the pool being removed from\n      unbound_pool_hash should be dynamic.  pool-\u003erefcnt is converted\n      to int from atomic_t and now manipulated inside workqueue_lock.\n\n    - Removed an incorrect sanity check on nr_idle in\n      put_unbound_pool() which may trigger spuriously.\n\n    All changes were suggested by Lai Jiangshan.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "7a4e344c5675eefbde93ed9a98ef45e0e4957bc2",
      "tree": "7a4383063512328184db9d20e27164824c44dc2c",
      "parents": [
        "4e1a1f9a051b4c9a2821a2a0f7f4a27c701fba51"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "message": "workqueue: introduce workqueue_attrs\n\nIntroduce struct workqueue_attrs which carries worker attributes -\ncurrently the nice level and allowed cpumask along with helper\nroutines alloc_workqueue_attrs() and free_workqueue_attrs().\n\nEach worker_pool now carries -\u003eattrs describing the attributes of its\nworkers.  All functions dealing with cpumask and nice level of workers\nare updated to follow worker_pool-\u003eattrs instead of determining them\nfrom other characteristics of the worker_pool, and init_workqueues()\nis updated to set worker_pool-\u003eattrs appropriately for all standard\npools.\n\nNote that create_worker() is updated to always perform set_user_nice()\nand use set_cpus_allowed_ptr() combined with manual assertion of\nPF_THREAD_BOUND instead of kthread_bind().  This simplifies handling\nrandom attributes without affecting the outcome.\n\nThis patch doesn\u0027t introduce any behavior changes.\n\nv2: Missing cpumask_var_t definition caused build failure on some\n    archs.  linux/cpumask.h included.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReported-by: kbuild test robot \u003cfengguang.wu@intel.com\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "4e1a1f9a051b4c9a2821a2a0f7f4a27c701fba51",
      "tree": "637cab0901bc51e12b1453c4f67a5387b8a673d1",
      "parents": [
        "34a06bd6b6fa92ccd9d3e6866b6cb91264c3cd20"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "message": "workqueue: separate out init_worker_pool() from init_workqueues()\n\nThis will be used to implement unbound pools with custom attributes.\n\nThis patch doesn\u0027t introduce any functional changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "34a06bd6b6fa92ccd9d3e6866b6cb91264c3cd20",
      "tree": "546c715508dd2d4a80c754b24e41e1d4d2899775",
      "parents": [
        "fa1b54e69bc6c04674c9bb96a6cfa8b2c9f44771"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "message": "workqueue: replace POOL_MANAGING_WORKERS flag with worker_pool-\u003emanager_arb\n\nPOOL_MANAGING_WORKERS is used to synchronize the manager role.\nSynchronizing among workers doesn\u0027t need blocking and that\u0027s why it\u0027s\nimplemented as a flag.\n\nIt got converted to a mutex a while back to add blocking wait from CPU\nhotplug path - 6037315269 (\"workqueue: use mutex for global_cwq\nmanager exclusion\").  Later it turned out that synchronization among\nworkers and cpu hotplug need to be done separately.  Eventually,\nPOOL_MANAGING_WORKERS is restored and workqueue-\u003emanager_mutex got\nmorphed into workqueue-\u003eassoc_mutex - 552a37e936 (\"workqueue: restore\nPOOL_MANAGING_WORKERS\") and b2eb83d123 (\"workqueue: rename\nmanager_mutex to assoc_mutex\").\n\nNow, we\u0027re gonna need to be able to lock out managers from\ndestroy_workqueue() to support multiple unbound pools with custom\nattributes making it again necessary to be able to block on the\nmanager role.  This patch replaces POOL_MANAGING_WORKERS with\nworker_pool-\u003emanager_arb.\n\nThis patch doesn\u0027t introduce any behavior changes.\n\nv2: s/manager_mutex/manager_arb/\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "fa1b54e69bc6c04674c9bb96a6cfa8b2c9f44771",
      "tree": "d04342a5015b1b88fdefeceabdb1f26479dcff65",
      "parents": [
        "76af4d936153afec176c53378e6ba8671e7e237d"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "message": "workqueue: update synchronization rules on worker_pool_idr\n\nMake worker_pool_idr protected by workqueue_lock for writes and\nsched-RCU protected for reads.  Lockdep assertions are added to\nfor_each_pool() and get_work_pool() and all their users are converted\nto either hold workqueue_lock or disable preemption/irq.\n\nworker_pool_assign_id() is updated to hold workqueue_lock when\nallocating a pool ID.  As idr_get_new() always performs RCU-safe\nassignment, this is enough on the writer side.\n\nAs standard pools are never destroyed, there\u0027s nothing to do on that\nside.\n\nThe locking is superflous at this point.  This is to help\nimplementation of unbound pools/pwqs with custom attributes.\n\nThis patch doesn\u0027t introduce any behavior changes.\n\nv2: Updated for_each_pwq() use if/else for the hidden assertion\n    statement instead of just if as suggested by Lai.  This avoids\n    confusing the following else clause.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "76af4d936153afec176c53378e6ba8671e7e237d",
      "tree": "94db54e019cc5c66305381f532506cc767df1930",
      "parents": [
        "7fb98ea79cecb14fc1735544146be06fdb1944c3"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "message": "workqueue: update synchronization rules on workqueue-\u003epwqs\n\nMake workqueue-\u003epwqs protected by workqueue_lock for writes and\nsched-RCU protected for reads.  Lockdep assertions are added to\nfor_each_pwq() and first_pwq() and all their users are converted to\neither hold workqueue_lock or disable preemption/irq.\n\nalloc_and_link_pwqs() is updated to use list_add_tail_rcu() for\nconsistency which isn\u0027t strictly necessary as the workqueue isn\u0027t\nvisible.  destroy_workqueue() isn\u0027t updated to sched-RCU release pwqs.\nThis is okay as the workqueue should have on users left by that point.\n\nThe locking is superflous at this point.  This is to help\nimplementation of unbound pools/pwqs with custom attributes.\n\nThis patch doesn\u0027t introduce any behavior changes.\n\nv2: Updated for_each_pwq() use if/else for the hidden assertion\n    statement instead of just if as suggested by Lai.  This avoids\n    confusing the following else clause.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "7fb98ea79cecb14fc1735544146be06fdb1944c3",
      "tree": "1110c0288884b507b1fcf4dddb823ea626415be2",
      "parents": [
        "420c0ddb1f205a3511b766d0dfee2cc87ed9dae0"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:30:00 2013 -0700"
      },
      "message": "workqueue: replace get_pwq() with explicit per_cpu_ptr() accesses and first_pwq()\n\nget_pwq() takes @cpu, which can also be WORK_CPU_UNBOUND, and @wq and\nreturns the matching pwq (pool_workqueue).  We want to move away from\nusing @cpu for identifying pools and pwqs for unbound pools with\ncustom attributes and there is only one user - workqueue_congested() -\nwhich makes use of the WQ_UNBOUND conditional in get_pwq().  All other\nusers already know whether they\u0027re dealing with a per-cpu or unbound\nworkqueue.\n\nReplace get_pwq() with explicit per_cpu_ptr(wq-\u003ecpu_pwqs, cpu) for\nper-cpu workqueues and first_pwq() for unbound ones, and open-code\nWQ_UNBOUND conditional in workqueue_congested().\n\nNote that this makes workqueue_congested() behave sligntly differently\nwhen @cpu other than WORK_CPU_UNBOUND is specified.  It ignores @cpu\nfor unbound workqueues and always uses the first pwq instead of\noopsing.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "420c0ddb1f205a3511b766d0dfee2cc87ed9dae0",
      "tree": "b40f69b265def3d67d2ea67b06584bc2e7437678",
      "parents": [
        "d84ff0512f1bfc0d8c864efadb4523fce68919cc"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:59 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:59 2013 -0700"
      },
      "message": "workqueue: remove workqueue_struct-\u003epool_wq.single\n\nworkqueue-\u003epool_wq union is used to point either to percpu pwqs\n(pool_workqueues) or single unbound pwq.  As the first pwq can be\naccessed via workqueue-\u003epwqs list, there\u0027s no reason for the single\npointer anymore.\n\nUse list_first_entry(workqueue-\u003epwqs) to access the unbound pwq and\ndrop workqueue-\u003epool_wq.single pointer and the pool_wq union.  It\nsimplifies the code and eases implementing multiple unbound pools w/\ncustom attributes.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "d84ff0512f1bfc0d8c864efadb4523fce68919cc",
      "tree": "b91fe48e9bd59e0709b00869cd200c79f882afff",
      "parents": [
        "493a1724fef9a3e931d9199f1a19e358e526a6e7"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:59 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:59 2013 -0700"
      },
      "message": "workqueue: consistently use int for @cpu variables\n\nWorkqueue is mixing unsigned int and int for @cpu variables.  There\u0027s\nno point in using unsigned int for cpus - many of cpu related APIs\ntake int anyway.  Consistently use int for @cpu variables so that we\ncan use negative values to mark special ones.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "493a1724fef9a3e931d9199f1a19e358e526a6e7",
      "tree": "5cb9ae483904b26b885ae5fb9fc7e7fdca635e71",
      "parents": [
        "24b8a84718ed28a51b452881612c267ba3f2b263"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:59 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:59 2013 -0700"
      },
      "message": "workqueue: add wokrqueue_struct-\u003emaydays list to replace mayday cpu iterators\n\nSimilar to how pool_workqueue iteration used to be, raising and\nservicing mayday requests is based on CPU numbers.  It\u0027s hairy because\ncpumask_t may not be able to handle WORK_CPU_UNBOUND and cpumasks are\nassumed to be always set on UP.  This is ugly and can\u0027t handle\nmultiple unbound pools to be added for unbound workqueues w/ custom\nattributes.\n\nAdd workqueue_struct-\u003emaydays.  When a pool_workqueue needs rescuing,\nit gets chained on the list through pool_workqueue-\u003emayday_node and\nrescuer_thread() consumes the list until it\u0027s empty.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "24b8a84718ed28a51b452881612c267ba3f2b263",
      "tree": "af47f74e181a6a431aee517f149015f769b7ed0a",
      "parents": [
        "171169695555831e8cc41dbc1783700868631ea5"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:58 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:58 2013 -0700"
      },
      "message": "workqueue: restructure pool / pool_workqueue iterations in freeze/thaw functions\n\nThe three freeze/thaw related functions - freeze_workqueues_begin(),\nfreeze_workqueues_busy() and thaw_workqueues() - need to iterate\nthrough all pool_workqueues of all freezable workqueues.  They did it\nby first iterating pools and then visiting all pwqs (pool_workqueues)\nof all workqueues and process it if its pwq-\u003epool matches the current\npool.  This is rather backwards and done this way partly because\nworkqueue didn\u0027t have fitting iteration helpers and partly to avoid\nthe number of lock operations on pool-\u003elock.\n\nWorkqueue now has fitting iterators and the locking operation overhead\nisn\u0027t anything to worry about - those locks are unlikely to be\ncontended and the same CPU visiting the same set of locks multiple\ntimes isn\u0027t expensive.\n\nRestructure the three functions such that the flow better matches the\nlogical steps and pwq iteration is done using for_each_pwq() inside\nworkqueue iteration.\n\n* freeze_workqueues_begin(): Setting of FREEZING is moved into a\n  separate for_each_pool() iteration.  pwq iteration for clearing\n  max_active is updated as described above.\n\n* freeze_workqueues_busy(): pwq iteration updated as described above.\n\n* thaw_workqueues(): The single for_each_wq_cpu() iteration is broken\n  into three discrete steps - clearing FREEZING, restoring max_active,\n  and kicking workers.  The first and last steps use for_each_pool()\n  and the second step uses pwq iteration described above.\n\nThis makes the code easier to understand and removes the use of\nfor_each_wq_cpu() for walking pwqs, which can\u0027t support multiple\nunbound pwqs which will be needed to implement unbound workqueues with\ncustom attributes.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "171169695555831e8cc41dbc1783700868631ea5",
      "tree": "62e774a7298eadb486a7148796b2e8cd627d6e77",
      "parents": [
        "49e3cf44df0663a521aa71e7667c52a9dbd0fce9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:58 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:58 2013 -0700"
      },
      "message": "workqueue: introduce for_each_pool()\n\nWith the scheduled unbound pools with custom attributes, there will be\nmultiple unbound pools, so it wouldn\u0027t be able to use\nfor_each_wq_cpu() + for_each_std_worker_pool() to iterate through all\npools.\n\nIntroduce for_each_pool() which iterates through all pools using\nworker_pool_idr and use it instead of for_each_wq_cpu() +\nfor_each_std_worker_pool() combination in freeze_workqueues_begin().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "49e3cf44df0663a521aa71e7667c52a9dbd0fce9",
      "tree": "6abded05fad30819d5f417cd967ffe468d25b629",
      "parents": [
        "30cdf2496d8ac2ef94b9b85f1891cf069490c8c4"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:58 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:58 2013 -0700"
      },
      "message": "workqueue: replace for_each_pwq_cpu() with for_each_pwq()\n\nIntroduce for_each_pwq() which iterates all pool_workqueues of a\nworkqueue using the recently added workqueue-\u003epwqs list and replace\nfor_each_pwq_cpu() usages with it.\n\nThis is primarily to remove the single unbound CPU assumption from pwq\niteration for the scheduled unbound pools with custom attributes\nsupport which would introduce multiple unbound pwqs per workqueue;\nhowever, it also simplifies iterator users.\n\nNote that pwq-\u003epool initialization is moved to alloc_and_link_pwqs()\nas that now is the only place which is explicitly handling the two pwq\ntypes.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "30cdf2496d8ac2ef94b9b85f1891cf069490c8c4",
      "tree": "0a3e95d353c7395cf92f03b3a23b5d2a9c86bb10",
      "parents": [
        "e904e6c2668bba78497c660aec812ca3f77f4ef9"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "message": "workqueue: add workqueue_struct-\u003epwqs list\n\nAdd workqueue_struct-\u003epwqs list and chain all pool_workqueues\nbelonging to a workqueue there.  This will be used to implement\ngeneric pool_workqueue iteration and handle multiple pool_workqueues\nfor the scheduled unbound pools with custom attributes.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "e904e6c2668bba78497c660aec812ca3f77f4ef9",
      "tree": "96aa53109506d97703c1195bc2dba7a47553d702",
      "parents": [
        "e98d5b16cf4df992c40a7c83f1eae61db5bb03da"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "message": "workqueue: introduce kmem_cache for pool_workqueues\n\npool_workqueues need to be aligned to 1 \u003c\u003c WORK_STRUCT_FLAG_BITS as\nthe lower bits of work-\u003edata are used for flags when they\u0027re pointing\nto pool_workqueues.\n\nDue to historical reasons, unbound pool_workqueues are allocated using\nkzalloc() with sufficient buffer area for alignment and aligned\nmanually.  The original pointer is stored at the end which free_pwqs()\nretrieves when freeing it.\n\nThere\u0027s no reason for this hackery anymore.  Set alignment of struct\npool_workqueue to 1 \u003c\u003c WORK_STRUCT_FLAG_BITS, add kmem_cache for\npool_workqueues with proper alignment and replace the hacky alloc and\nfree implementation with plain kmem_cache_zalloc/free().\n\nIn case WORK_STRUCT_FLAG_BITS gets shrunk too much and makes fields of\npool_workqueues misaligned, trigger WARN if the alignment of struct\npool_workqueue becomes smaller than that of long long.\n\nNote that assertion on IS_ALIGNED() is removed from alloc_pwqs().  We\nalready have another one in pwq init loop in __alloc_workqueue_key().\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "e98d5b16cf4df992c40a7c83f1eae61db5bb03da",
      "tree": "57bb6a301fde2b7e5a8bf8f2a8198e3b344acdd2",
      "parents": [
        "6183c009f6cd94b42e5812adcfd4ba6220a196e1"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "message": "workqueue: make workqueue_lock irq-safe\n\nworkqueue_lock will be used to synchronize areas which require\nirq-safety and there isn\u0027t much benefit in keeping it not irq-safe.\nMake it irq-safe.\n\nThis patch doesn\u0027t introduce any visible behavior changes.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "6183c009f6cd94b42e5812adcfd4ba6220a196e1",
      "tree": "a0df8377ea42816c541a45fce4a1700f3cb342c1",
      "parents": [
        "b31041042a8cdece67f925e4bae55b5f5fd754ca"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Mar 12 11:29:57 2013 -0700"
      },
      "message": "workqueue: make sanity checks less punshing using WARN_ON[_ONCE]()s\n\nWorkqueue has been using mostly BUG_ON()s for sanity checks, which\nfail unnecessarily harshly when the assertion doesn\u0027t hold.  Most\nassertions can converted to be less drastic such that things can limp\nalong instead of dying completely.  Convert BUG_ON()s to\nWARN_ON[_ONCE]()s with softer failure behaviors - e.g. if assertion\ncheck fails in destroy_worker(), trigger WARN and silently ignore\ndestruction request.\n\nMost conversions are trivial.  Note that sanity checks in\ndestroy_workqueue() are moved above removal from workqueues list so\nthat it can bail out without side-effects if assertion checks fail.\n\nThis patch doesn\u0027t introduce any visible behavior changes during\nnormal operation.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nReviewed-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\n"
    },
    {
      "commit": "eb2834285cf172856cd12f66892fc7467935ebed",
      "tree": "bf0a3125e85b7acf2dc43e0d4f82b68459e77a36",
      "parents": [
        "6dbe51c251a327e012439c4772097a13df43c5b8"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Fri Mar 08 15:18:28 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Fri Mar 08 15:18:28 2013 -0800"
      },
      "message": "workqueue: fix possible pool stall bug in wq_unbind_fn()\n\nSince multiple pools per cpu have been introduced, wq_unbind_fn() has\na subtle bug which may theoretically stall work item processing.  The\nproblem is two-fold.\n\n* wq_unbind_fn() depends on the worker executing wq_unbind_fn() itself\n  to start unbound chain execution, which works fine when there was\n  only single pool.  With multiple pools, only the pool which is\n  running wq_unbind_fn() - the highpri one - is guaranteed to have\n  such kick-off.  The other pool could stall when its busy workers\n  block.\n\n* The current code is setting WORKER_UNBIND / POOL_DISASSOCIATED of\n  the two pools in succession without initiating work execution\n  inbetween.  Because setting the flags requires grabbing assoc_mutex\n  which is held while new workers are created, this could lead to\n  stalls if a pool\u0027s manager is waiting for the previous pool\u0027s work\n  items to release memory.  This is almost purely theoretical tho.\n\nUpdate wq_unbind_fn() such that it sets WORKER_UNBIND /\nPOOL_DISASSOCIATED, goes over schedule() and explicitly kicks off\nexecution for a pool and then moves on to the next one.\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\nCc: stable@vger.kernel.org\n"
    },
    {
      "commit": "b31041042a8cdece67f925e4bae55b5f5fd754ca",
      "tree": "6392271c537c05d59e0d72ac72463343d2a29249",
      "parents": [
        "f36dc67b27a689eeb3631b11ebef17bbff257fbb"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Feb 19 12:17:02 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 04 09:44:58 2013 -0800"
      },
      "message": "workqueue: better define synchronization rule around rescuer-\u003epool updates\n\nRescuers visit different worker_pools to process work items from pools\nunder pressure.  Currently, rescuer-\u003epool is updated outside any\nlocking and when an outsider looks at a rescuer, there\u0027s no way to\ntell when and whether rescuer-\u003epool is gonna change.  While this\ndoesn\u0027t currently cause any problem, it is nasty.\n\nWith recent worker_maybe_bind_and_lock() changes, we can move\nrescuer-\u003epool updates inside pool locks such that if rescuer-\u003epool\nequals a locked pool, it\u0027s guaranteed to stay that way until the pool\nis unlocked.\n\nMove rescuer-\u003epool inside pool-\u003elock.\n\nThis patch doesn\u0027t introduce any visible behavior difference.\n\ntj: Updated the description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "f36dc67b27a689eeb3631b11ebef17bbff257fbb",
      "tree": "d93c4310742fae4633af6ebddf53fe649ca4965d",
      "parents": [
        "f5faa0774e07eada85b0c55ec789b3f337d01412"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Feb 19 12:17:02 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 04 09:44:58 2013 -0800"
      },
      "message": "workqueue: change argument of worker_maybe_bind_and_lock() to @pool\n\nworker_maybe_bind_and_lock() currently takes @worker but only cares\nabout @worker-\u003epool.  This patch updates worker_maybe_bind_and_lock()\nto take @pool instead of @worker.  This will be used to better define\nsynchronization rules regarding rescuer-\u003epool updates.\n\nThis doesn\u0027t introduce any functional change.\n\ntj: Updated the 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": "f5faa0774e07eada85b0c55ec789b3f337d01412",
      "tree": "439566bd5b8d0187d380b950ef386c349448aca9",
      "parents": [
        "45d9550a0e7e9230606ca3c4c6f4dc6297848b2f"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Tue Feb 19 12:17:02 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Mon Mar 04 09:44:58 2013 -0800"
      },
      "message": "workqueue: use %current instead of worker-\u003etask in worker_maybe_bind_and_lock()\n\nworker_maybe_bind_and_lock() uses both @worker-\u003etask and @current at\nthe same time.  As worker_maybe_bind_and_lock() can only be called by\nthe current worker task, they are always the same.\n\nUpdate worker_maybe_bind_and_lock() to use %current consistently.\n\nThis doesn\u0027t introduce any functional change.\n\ntj: Massaged the description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "b67bfe0d42cac56c512dd5da4b1b347a23f4b70a",
      "tree": "3d465aea12b97683f26ffa38eba8744469de9997",
      "parents": [
        "1e142b29e210b5dfb2deeb6ce2210b60af16d2a6"
      ],
      "author": {
        "name": "Sasha Levin",
        "email": "sasha.levin@oracle.com",
        "time": "Wed Feb 27 17:06:00 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Feb 27 19:10:24 2013 -0800"
      },
      "message": "hlist: drop the node parameter from iterators\n\nI\u0027m not sure why, but the hlist for each entry iterators were conceived\n\n        list_for_each_entry(pos, head, member)\n\nThe hlist ones were greedy and wanted an extra parameter:\n\n        hlist_for_each_entry(tpos, pos, head, member)\n\nWhy did they need an extra pos parameter? I\u0027m not quite sure. Not only\nthey don\u0027t really need it, it also prevents the iterator from looking\nexactly like the list iterator, which is unfortunate.\n\nBesides the semantic patch, there was some manual work required:\n\n - Fix up the actual hlist iterators in linux/list.h\n - Fix up the declaration of other iterators based on the hlist ones.\n - A very small amount of places were using the \u0027node\u0027 parameter, this\n was modified to use \u0027obj-\u003emember\u0027 instead.\n - Coccinelle didn\u0027t handle the hlist_for_each_entry_safe iterator\n properly, so those had to be fixed up manually.\n\nThe semantic patch which is mostly the work of Peter Senna Tschudin is here:\n\n@@\niterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;\n\ntype T;\nexpression a,c,d,e;\nidentifier b;\nstatement S;\n@@\n\n-T b;\n    \u003c+... when !\u003d b\n(\nhlist_for_each_entry(a,\n- b,\nc, d) S\n|\nhlist_for_each_entry_continue(a,\n- b,\nc) S\n|\nhlist_for_each_entry_from(a,\n- b,\nc) S\n|\nhlist_for_each_entry_rcu(a,\n- b,\nc, d) S\n|\nhlist_for_each_entry_rcu_bh(a,\n- b,\nc, d) S\n|\nhlist_for_each_entry_continue_rcu_bh(a,\n- b,\nc) S\n|\nfor_each_busy_worker(a, c,\n- b,\nd) S\n|\nax25_uid_for_each(a,\n- b,\nc) S\n|\nax25_for_each(a,\n- b,\nc) S\n|\ninet_bind_bucket_for_each(a,\n- b,\nc) S\n|\nsctp_for_each_hentry(a,\n- b,\nc) S\n|\nsk_for_each(a,\n- b,\nc) S\n|\nsk_for_each_rcu(a,\n- b,\nc) S\n|\nsk_for_each_from\n-(a, b)\n+(a)\nS\n+ sk_for_each_from(a) S\n|\nsk_for_each_safe(a,\n- b,\nc, d) S\n|\nsk_for_each_bound(a,\n- b,\nc) S\n|\nhlist_for_each_entry_safe(a,\n- b,\nc, d, e) S\n|\nhlist_for_each_entry_continue_rcu(a,\n- b,\nc) S\n|\nnr_neigh_for_each(a,\n- b,\nc) S\n|\nnr_neigh_for_each_safe(a,\n- b,\nc, d) S\n|\nnr_node_for_each(a,\n- b,\nc) S\n|\nnr_node_for_each_safe(a,\n- b,\nc, d) S\n|\n- for_each_gfn_sp(a, c, d, b) S\n+ for_each_gfn_sp(a, c, d) S\n|\n- for_each_gfn_indirect_valid_sp(a, c, d, b) S\n+ for_each_gfn_indirect_valid_sp(a, c, d) S\n|\nfor_each_host(a,\n- b,\nc) S\n|\nfor_each_host_safe(a,\n- b,\nc, d) S\n|\nfor_each_mesh_entry(a,\n- b,\nc, d) S\n)\n    ...+\u003e\n\n[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]\n[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]\n[akpm@linux-foundation.org: checkpatch fixes]\n[akpm@linux-foundation.org: fix warnings]\n[akpm@linux-foudnation.org: redo intrusive kvm changes]\nTested-by: Peter Senna Tschudin \u003cpeter.senna@gmail.com\u003e\nAcked-by: Paul E. McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\nSigned-off-by: Sasha Levin \u003csasha.levin@oracle.com\u003e\nCc: Wu Fengguang \u003cfengguang.wu@intel.com\u003e\nCc: Marcelo Tosatti \u003cmtosatti@redhat.com\u003e\nCc: Gleb Natapov \u003cgleb@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "1438ade5670b56d5386c220e1ad4b5a824a1e585",
      "tree": "3642109a131da8a00a39c409d746618b2c6db797",
      "parents": [
        "112202d9098aae2c36436e5178c0cf3ced423c7b"
      ],
      "author": {
        "name": "Konstantin Khlebnikov",
        "email": "khlebnikov@openvz.org",
        "time": "Thu Jan 24 16:36:31 2013 +0400"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Tue Feb 19 10:09:13 2013 -0800"
      },
      "message": "workqueue: un-GPL function delayed_work_timer_fn()\n\ncommit d8e794dfd51c368ed3f686b7f4172830b60ae47b (\"workqueue: set\ndelayed_work-\u003etimer function on initialization\") exports function\ndelayed_work_timer_fn() only for GPL modules. This makes delayed-works\nunusable for non-GPL modules, because initialization macro now requires\nGPL symbol. For example schedule_delayed_work() available for non-GPL.\n\nSigned-off-by: Konstantin Khlebnikov \u003ckhlebnikov@openvz.org\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\nCc: stable@vger.kernel.org # 3.7\n"
    },
    {
      "commit": "112202d9098aae2c36436e5178c0cf3ced423c7b",
      "tree": "2297f17b2ba0c556173566560f33fe7a1b20a904",
      "parents": [
        "8d03ecfe471802d6afe97da97722b6924533aa82"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 13 19:29:12 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 13 19:29:12 2013 -0800"
      },
      "message": "workqueue: rename cpu_workqueue to pool_workqueue\n\nworkqueue has moved away from global_cwqs to worker_pools and with the\nscheduled custom worker pools, wforkqueues will be associated with\npools which don\u0027t have anything to do with CPUs.  The workqueue code\nwent through significant amount of changes recently and mass renaming\nisn\u0027t likely to hurt much additionally.  Let\u0027s replace \u0027cpu\u0027 with\n\u0027pool\u0027 so that it reflects the current design.\n\n* s/struct cpu_workqueue_struct/struct pool_workqueue/\n* s/cpu_wq/pool_wq/\n* s/cwq/pwq/\n\nThis patch is purely cosmetic.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8d03ecfe471802d6afe97da97722b6924533aa82",
      "tree": "1178cacfdd36358665f9a4c6325329346b221dd0",
      "parents": [
        "1dd638149f1f9d7d7dbb32591d5c7c2a0ea36264"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 13 19:29:10 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 13 19:29:10 2013 -0800"
      },
      "message": "workqueue: reimplement is_chained_work() using current_wq_worker()\n\nis_chained_work() was added before current_wq_worker() and implemented\nits own ham-fisted way of finding out whether %current is a workqueue\nworker - it iterates through all possible workers.\n\nDrop the custom implementation and reimplement using\ncurrent_wq_worker().\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "1dd638149f1f9d7d7dbb32591d5c7c2a0ea36264",
      "tree": "454399689b5d5016eefbd9f12e39b2674a8ebb33",
      "parents": [
        "8594fade39d3ad02ef856b8c53b5d7cc538a55f5"
      ],
      "author": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 13 19:29:07 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Wed Feb 13 19:29:07 2013 -0800"
      },
      "message": "workqueue: fix is_chained_work() regression\n\nc9e7cf273f (\"workqueue: move busy_hash from global_cwq to\nworker_pool\") incorrectly converted is_chained_work() to use\nget_gcwq() inside for_each_gcwq_cpu() while removing get_gcwq().\n\nAs cwq might not exist for all possible workqueue CPUs, @cwq can be\nNULL and the following cwq deferences can lead to oops.\n\nFix it by using for_each_cwq_cpu() instead, which is the better one to\nuse anyway as we only need to check pools that the wq is associated\nwith.\n\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "8594fade39d3ad02ef856b8c53b5d7cc538a55f5",
      "tree": "7f14598186e3fbc5feb91b1c25905b51d106a104",
      "parents": [
        "54d5b7d079dffa74597715a892473b474babd5b5"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Thu Feb 07 13:14:20 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Feb 07 13:17:51 2013 -0800"
      },
      "message": "workqueue: pick cwq instead of pool in __queue_work()\n\nCurrently, __queue_work() chooses the pool to queue a work item to and\nthen determines cwq from the target wq and the chosen pool.  This is a\nbit backwards in that we can determine cwq first and simply use\ncwq-\u003epool.  This way, we can skip get_std_worker_pool() in queueing\npath which will be a hurdle when implementing custom worker pools.\n\nUpdate __queue_work() such that it chooses the target cwq and then use\ncwq-\u003epool instead of the other way around.  While at it, add missing\n{} in an if statement.\n\nThis patch doesn\u0027t introduce any functional changes.\n\ntj: The original patch had two get_cwq() calls - the first to\n    determine the pool by doing get_cwq(cpu, wq)-\u003epool and the second\n    to determine the matching cwq from get_cwq(pool-\u003ecpu, wq).\n    Updated the function such that it chooses cwq instead of pool and\n    removed the second call.  Rewrote the description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    },
    {
      "commit": "54d5b7d079dffa74597715a892473b474babd5b5",
      "tree": "33aa61fc2a98acff099a2393665318328448e137",
      "parents": [
        "e19e397a85f33100bfa4210e256bec82fe22e167"
      ],
      "author": {
        "name": "Lai Jiangshan",
        "email": "laijs@cn.fujitsu.com",
        "time": "Thu Feb 07 13:14:20 2013 -0800"
      },
      "committer": {
        "name": "Tejun Heo",
        "email": "tj@kernel.org",
        "time": "Thu Feb 07 13:14:20 2013 -0800"
      },
      "message": "workqueue: make get_work_pool_id() cheaper\n\nget_work_pool_id() currently first obtains pool using get_work_pool()\nand then return pool-\u003eid.  For an off-queue work item, this involves\nobtaining pool ID from worker-\u003edata, performing idr_find() to find the\nmatching pool and then returning its pool-\u003eid which of course is the\nsame as the one which went into idr_find().\n\nJust open code WORK_STRUCT_CWQ case and directly return pool ID from\nwork-\u003edata.\n\ntj: The original patch dropped on-queue work item handling and renamed\n    the function to offq_work_pool_id().  There isn\u0027t much benefit in\n    doing so.  Handling it only requires a single if() and we need at\n    least BUG_ON(), which is also a branch, even if we drop on-queue\n    handling.  Open code WORK_STRUCT_CWQ case and keep the function in\n    line with get_work_pool().  Rewrote the description.\n\nSigned-off-by: Lai Jiangshan \u003claijs@cn.fujitsu.com\u003e\nSigned-off-by: Tejun Heo \u003ctj@kernel.org\u003e\n"
    }
  ],
  "next": "e19e397a85f33100bfa4210e256bec82fe22e167"
}
