)]}'
{
  "log": [
    {
      "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": "dbf520a9d7d4d5ba28d2947be11e34099a5e3e20",
      "tree": "29e7a07a13a76a89b3c175c58592b2d3b176cfa5",
      "parents": [
        "13d2080db3472b3399ba32e6026960de5d32a344"
      ],
      "author": {
        "name": "Paul Walmsley",
        "email": "paul@pwsan.com",
        "time": "Sun Mar 31 00:04:40 2013 +0000"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Sun Mar 31 11:38:33 2013 -0700"
      },
      "message": "Revert \"lockdep: check that no locks held at freeze time\"\n\nThis reverts commit 6aa9707099c4b25700940eb3d016f16c4434360d.\n\nCommit 6aa9707099c4 (\"lockdep: check that no locks held at freeze time\")\ncauses problems with NFS root filesystems.  The failures were noticed on\nOMAP2 and 3 boards during kernel init:\n\n  [ BUG: swapper/0/1 still has locks held! ]\n  3.9.0-rc3-00344-ga937536 #1 Not tainted\n  -------------------------------------\n  1 lock held by swapper/0/1:\n   #0:  (\u0026type-\u003es_umount_key#13/1){+.+.+.}, at: [\u003cc011e84c\u003e] sget+0x248/0x574\n\n  stack backtrace:\n    rpc_wait_bit_killable\n    __wait_on_bit\n    out_of_line_wait_on_bit\n    __rpc_execute\n    rpc_run_task\n    rpc_call_sync\n    nfs_proc_get_root\n    nfs_get_root\n    nfs_fs_mount_common\n    nfs_try_mount\n    nfs_fs_mount\n    mount_fs\n    vfs_kern_mount\n    do_mount\n    sys_mount\n    do_mount_root\n    mount_root\n    prepare_namespace\n    kernel_init_freeable\n    kernel_init\n\nAlthough the rootfs mounts, the system is unstable.  Here\u0027s a transcript\nfrom a PM test:\n\n  http://www.pwsan.com/omap/testlogs/test_v3.9-rc3/20130317194234/pm/37xxevm/37xxevm_log.txt\n\nHere\u0027s what the test log should look like:\n\n  http://www.pwsan.com/omap/testlogs/test_v3.8/20130218214403/pm/37xxevm/37xxevm_log.txt\n\nMailing list discussion is here:\n\n  http://lkml.org/lkml/2013/3/4/221\n\nDeal with this for v3.9 by reverting the problem commit, until folks can\nfigure out the right long-term course of action.\n\nSigned-off-by: Paul Walmsley \u003cpaul@pwsan.com\u003e\nCc: Mandeep Singh Baines \u003cmsb@chromium.org\u003e\nCc: Jeff Layton \u003cjlayton@redhat.com\u003e\nCc: Shawn Guo \u003cshawn.guo@linaro.org\u003e\nCc: \u003cmaciej.rutecki@gmail.com\u003e\nCc: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nCc: Trond Myklebust \u003cTrond.Myklebust@netapp.com\u003e\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e\nCc: Ben Chan \u003cbenchan@chromium.org\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: Tejun Heo \u003ctj@kernel.org\u003e\nCc: Rafael J. Wysocki \u003crjw@sisk.pl\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2c3de1c2d7d68c6ba4c1ecd82c68285f34d9609e",
      "tree": "6a09ce761173a966718f9009514dcc90bd9947b7",
      "parents": [
        "9064171268d838b8f283fe111ef086b9479d059a",
        "87a8ebd637dafc255070f503909a053cf0d98d3f"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 28 13:43:46 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 28 13:43:46 2013 -0700"
      },
      "message": "Merge branch \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace\n\nPull userns fixes from Eric W Biederman:\n \"The bulk of the changes are fixing the worst consequences of the user\n  namespace design oversight in not considering what happens when one\n  namespace starts off as a clone of another namespace, as happens with\n  the mount namespace.\n\n  The rest of the changes are just plain bug fixes.\n\n  Many thanks to Andy Lutomirski for pointing out many of these issues.\"\n\n* \u0027for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:\n  userns: Restrict when proc and sysfs can be mounted\n  ipc: Restrict mounting the mqueue filesystem\n  vfs: Carefully propogate mounts across user namespaces\n  vfs: Add a mount flag to lock read only bind mounts\n  userns:  Don\u0027t allow creation if the user is chrooted\n  yama:  Better permission check for ptraceme\n  pid: Handle the exit of a multi-threaded init.\n  scm: Require CAP_SYS_ADMIN over the current pidns to spoof pids.\n"
    },
    {
      "commit": "87a8ebd637dafc255070f503909a053cf0d98d3f",
      "tree": "0bc879f9118c3333c73dfd15223a79e6219f64fd",
      "parents": [
        "a636b702ed1805e988ad3d8ff8b52c060f8b341c"
      ],
      "author": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Sun Mar 24 14:28:27 2013 -0700"
      },
      "committer": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Wed Mar 27 07:50:08 2013 -0700"
      },
      "message": "userns: Restrict when proc and sysfs can be mounted\n\nOnly allow unprivileged mounts of proc and sysfs if they are already\nmounted when the user namespace is created.\n\nproc and sysfs are interesting because they have content that is\nper namespace, and so fresh mounts are needed when new namespaces\nare created while at the same time proc and sysfs have content that\nis shared between every instance.\n\nRespect the policy of who may see the shared content of proc and sysfs\nby only allowing new mounts if there was an existing mount at the time\nthe user namespace was created.\n\nIn practice there are only two interesting cases: proc and sysfs are\nmounted at their usual places, proc and sysfs are not mounted at all\n(some form of mount namespace jail).\n\nCc: stable@vger.kernel.org\nAcked-by: Serge Hallyn \u003cserge.hallyn@canonical.com\u003e\nSigned-off-by: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\n"
    },
    {
      "commit": "3151527ee007b73a0ebd296010f1c0454a919c7d",
      "tree": "33175354889523cd20586fb28456e566529c46d9",
      "parents": [
        "eddc0a3abff273842a94784d2d022bbc36dc9015"
      ],
      "author": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Fri Mar 15 01:45:51 2013 -0700"
      },
      "committer": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Wed Mar 27 07:49:29 2013 -0700"
      },
      "message": "userns:  Don\u0027t allow creation if the user is chrooted\n\nGuarantee that the policy of which files may be access that is\nestablished by setting the root directory will not be violated\nby user namespaces by verifying that the root directory points\nto the root of the mount namespace at the time of user namespace\ncreation.\n\nChanging the root is a privileged operation, and as a matter of policy\nit serves to limit unprivileged processes to files below the current\nroot directory.\n\nFor reasons of simplicity and comprehensibility the privilege to\nchange the root directory is gated solely on the CAP_SYS_CHROOT\ncapability in the user namespace.  Therefore when creating a user\nnamespace we must ensure that the policy of which files may be access\ncan not be violated by changing the root directory.\n\nAnyone who runs a processes in a chroot and would like to use user\nnamespace can setup the same view of filesystems with a mount\nnamespace instead.  With this result that this is not a practical\nlimitation for using user namespaces.\n\nCc: stable@vger.kernel.org\nAcked-by: Serge Hallyn \u003cserge.hallyn@canonical.com\u003e\nReported-by: Andy Lutomirski \u003cluto@amacapital.net\u003e\nSigned-off-by: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\n"
    },
    {
      "commit": "751c644b95bb48aaa8825f0c66abbcc184d92051",
      "tree": "ac5fa98b0281b5c8db1ac5859d15ac5c2b22e5f4",
      "parents": [
        "92f28d973cce45ef5823209aab3138eb45d8b349"
      ],
      "author": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Tue Mar 26 02:27:11 2013 -0700"
      },
      "committer": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Tue Mar 26 03:41:23 2013 -0700"
      },
      "message": "pid: Handle the exit of a multi-threaded init.\n\nWhen a multi-threaded init exits and the initial thread is not the\nlast thread to exit the initial thread hangs around as a zombie\nuntil the last thread exits.  In that case zap_pid_ns_processes\nneeds to wait until there are only 2 hashed pids in the pid\nnamespace not one.\n\nv2. Replace thread_pid_vnr(me) \u003d\u003d 1 with the test thread_group_leader(me)\n    as suggested by Oleg.\n\nCc: stable@vger.kernel.org\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nReported-by: Caj Larsson \u003ccaj@omnicloud.com\u003e\nSigned-off-by: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\n"
    },
    {
      "commit": "a12183c62717ac4579319189a00f5883a18dff08",
      "tree": "cad09026a6987c710f1bbfc38730f5e0f0d0796d",
      "parents": [
        "53b680924800ad6c67f7e54ca7d5bdc4859d2318",
        "a7dc19b8652c862d5b7c4d2339bd3c428bd29c4a"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 25 18:03:34 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Mon Mar 25 18:03:34 2013 -0700"
      },
      "message": "Merge branch \u0027timers-urgent-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip\n\nPull timer fix from Thomas Gleixner:\n \"A single bugfix which prevents that a non functional timer device is\n  selected to provide the fallback device, which is supposed to serve\n  timer interrupts on behalf of non functional devices ...\"\n\n* \u0027timers-urgent-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:\n  clockevents: Don\u0027t allow dummy broadcast timers\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": "2ca067efd82939dfd87827d29d36a265823a4c2f",
      "tree": "a6291128f65ef015ab36460a5e5f39a5bc25c4a1",
      "parents": [
        "d00285884c0892bb1310df96bce6056e9ce9b9d9"
      ],
      "author": {
        "name": "Oleg Nesterov",
        "email": "oleg@redhat.com",
        "time": "Fri Mar 22 15:04:41 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 22 16:41:20 2013 -0700"
      },
      "message": "poweroff: change orderly_poweroff() to use schedule_work()\n\nDavid said:\n\n    Commit 6c0c0d4d1080 (\"poweroff: fix bug in orderly_poweroff()\")\n    apparently fixes one bug in orderly_poweroff(), but introduces\n    another.  The comments on orderly_poweroff() claim it can be called\n    from any context - and indeed we call it from interrupt context in\n    arch/powerpc/platforms/pseries/ras.c for example.  But since that\n    commit this is no longer safe, since call_usermodehelper_fns() is not\n    safe in interrupt context without the UMH_NO_WAIT option.\n\norderly_poweroff() can be used from any context but UMH_WAIT_EXEC is\nsleepable.  Move the \"force\" logic into __orderly_poweroff() and change\norderly_poweroff() to use the global poweroff_work which simply calls\n__orderly_poweroff().\n\nWhile at it, remove the unneeded \"int argc\" and change argv_split() to\nuse GFP_KERNEL.\n\nWe use the global \"bool poweroff_force\" to pass the argument, this can\nobviously affect the previous request if it is pending/running.  So we\nonly allow the \"false \u003d\u003e true\" transition assuming that the pending\n\"true\" should succeed anyway.  If schedule_work() fails after that we\nknow that work-\u003efunc() was not called yet, it must see the new value.\n\nThis means that orderly_poweroff() becomes async even if we do not run\nthe command and always succeeds, schedule_work() can only fail if the\nwork is already pending.  We can export __orderly_poweroff() and change\nthe non-atomic callers which want the old semantics.\n\nSigned-off-by: Oleg Nesterov \u003coleg@redhat.com\u003e\nReported-by: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e\nReported-by: David Gibson \u003cdavid@gibson.dropbear.id.au\u003e\nCc: Lucas De Marchi \u003clucas.demarchi@profusion.mobi\u003e\nCc: Feng Hong \u003chongfeng@marvell.com\u003e\nCc: Kees Cook \u003ckeescook@chromium.org\u003e\nCc: Serge Hallyn \u003cserge.hallyn@canonical.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: \"Rafael J. Wysocki\" \u003crjw@sisk.pl\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "dc72c32e1fd872a9a4fdfe645283c9dcd68e556d",
      "tree": "66f817ecb840f59173de2a95a9a69fb5c3a75d21",
      "parents": [
        "fe8d52614bd419cedef85ef55850fd090373f481"
      ],
      "author": {
        "name": "Frederic Weisbecker",
        "email": "fweisbec@gmail.com",
        "time": "Fri Mar 22 15:04:39 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Fri Mar 22 16:41:20 2013 -0700"
      },
      "message": "printk: Provide a wake_up_klogd() off-case\n\nwake_up_klogd() is useless when CONFIG_PRINTK\u003dn because neither printk()\nnor printk_sched() are in use and there are actually no waiter on\nlog_wait waitqueue.  It should be a stub in this case for users like\nbust_spinlocks().\n\nOtherwise this results in this warning when CONFIG_PRINTK\u003dn and\nCONFIG_IRQ_WORK\u003dn:\n\n\tkernel/built-in.o In function `wake_up_klogd\u0027:\n\t(.text.wake_up_klogd+0xb4): undefined reference to `irq_work_queue\u0027\n\nTo fix this, provide an off-case for wake_up_klogd() when\nCONFIG_PRINTK\u003dn.\n\nThere is much more from console_unlock() and other console related code\nin printk.c that should be moved under CONFIG_PRINTK.  But for now,\nfocus on a minimal fix as we passed the merged window already.\n\n[akpm@linux-foundation.org: include printk.h in bust_spinlocks.c]\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nReported-by: James Hogan \u003cjames.hogan@imgtec.com\u003e\nCc: James Hogan \u003cjames.hogan@imgtec.com\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Peter Zijlstra \u003cpeterz@infradead.org\u003e\nCc: Ingo Molnar \u003cmingo@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": "cd82346934888e083da3b70e4bea13923175d086",
      "tree": "40d5058b50864e2c42e5a14cc4bd1029fe9373e0",
      "parents": [
        "172a271b5e090da7468c66b9ccbcdb3d929eed75",
        "fd4a5aef002bb57e8a35ed34d8a878034b9bde94"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 21 08:29:11 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Mar 21 08:29:11 2013 -0700"
      },
      "message": "Merge branch \u0027perf-urgent-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip\n\nPull perf fixes from Ingo Molnar:\n \"A fair chunk of the linecount comes from a fix for a tracing bug that\n  corrupts latency tracing buffers when the overwrite mode is changed on\n  the fly - the rest is mostly assorted fewliner fixlets.\"\n\n* \u0027perf-urgent-for-linus\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:\n  perf/x86: Add SNB/SNB-EP scheduling constraints for cycle_activity event\n  kprobes/x86: Check Interrupt Flag modifier when registering probe\n  kprobes: Make hash_64() as always inlined\n  perf: Generate EXIT event only once per task context\n  perf: Reset hwc-\u003elast_period on sw clock events\n  tracing: Prevent buffer overwrite disabled for latency tracers\n  tracing: Keep overwrite in sync between regular and snapshot buffers\n  tracing: Protect tracer flags with trace_types_lock\n  perf tools: Fix LIBNUMA build with glibc 2.12 and older.\n  tracing: Fix free of probe entry by calling call_rcu_sched()\n  perf/POWER7: Create a sysfs format entry for Power7 events\n  perf probe: Fix segfault\n  libtraceevent: Remove hard coded include to /usr/local/include in Makefile\n  perf record: Fix -C option\n  perf tools: check if -DFORTIFY_SOURCE\u003d2 is allowed\n  perf report: Fix build with NO_NEWT\u003d1\n  perf annotate: Fix build with NO_NEWT\u003d1\n  tracing: Fix race in snapshot swapping\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": "1f1b396758eff67b43b226904e1748f1e4272b4d",
      "tree": "b9dc20f6c135edc4ff7857323430f71f619c3c7b",
      "parents": [
        "d610d98b5de6860feb21539726e9af7c9094151c",
        "613f04a0f51e6e68ac6fe571ab79da3c0a5eb4da"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Mon Mar 18 09:48:29 2013 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Mon Mar 18 09:48:29 2013 +0100"
      },
      "message": "Merge branch \u0027tip/perf/urgent-2\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent\n\nPull tracing fixes from Steven Rostedt.\n\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "d610d98b5de6860feb21539726e9af7c9094151c",
      "tree": "d2a437e1a73150a3b6386f4bf7bd4e20d27031c6",
      "parents": [
        "778141e3cf0bf29f91cd3cb5c314ea477b9402a7"
      ],
      "author": {
        "name": "Namhyung Kim",
        "email": "namhyung.kim@lge.com",
        "time": "Fri Mar 15 16:27:13 2013 +0900"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Mon Mar 18 09:47:33 2013 +0100"
      },
      "message": "perf: Generate EXIT event only once per task context\n\nperf_event_task_event() iterates pmu list and generate events\nfor each eligible pmu context.  But if task_event has task_ctx\nlike in EXIT it\u0027ll generate events even though the pmu doesn\u0027t\nhave an eligible one. Fix it by moving the code to proper\nplaces.\n\nBefore this patch:\n\n  $ perf record -n true\n  [ perf record: Woken up 1 times to write data ]\n  [ perf record: Captured and wrote 0.006 MB perf.data (~248 samples) ]\n\n  $ perf report -D | tail\n  Aggregated stats:\n             TOTAL events:         73\n              MMAP events:         67\n              COMM events:          2\n              EXIT events:          4\n  cycles stats:\n             TOTAL events:         73\n              MMAP events:         67\n              COMM events:          2\n              EXIT events:          4\n\nAfter this patch:\n\n  $ perf report -D | tail\n  Aggregated stats:\n             TOTAL events:         70\n              MMAP events:         67\n              COMM events:          2\n              EXIT events:          1\n  cycles stats:\n             TOTAL events:         70\n              MMAP events:         67\n              COMM events:          2\n              EXIT events:          1\n\nSigned-off-by: Namhyung Kim \u003cnamhyung@kernel.org\u003e\nCc: Arnaldo Carvalho de Melo \u003cacme@ghostprotocols.net\u003e\nCc: Jiri Olsa \u003cjolsa@redhat.com\u003e\nCc: Namhyung Kim \u003cnamhyung.kim@lge.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nLink: http://lkml.kernel.org/r/1363332433-7637-1-git-send-email-namhyung@kernel.org\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "778141e3cf0bf29f91cd3cb5c314ea477b9402a7",
      "tree": "de069a0bae57f6f3172cd9958dd2c40148950a4d",
      "parents": [
        "0b34083f46c3784c6535dc9742dc13653ec1908d"
      ],
      "author": {
        "name": "Namhyung Kim",
        "email": "namhyung.kim@lge.com",
        "time": "Mon Mar 18 11:41:46 2013 +0900"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Mon Mar 18 09:15:18 2013 +0100"
      },
      "message": "perf: Reset hwc-\u003elast_period on sw clock events\n\nWhen cpu/task clock events are initialized, their sampling\nfrequencies are converted to have a fixed value.  However it\nmissed to update the hwc-\u003elast_period which was set to 1 for\ninitial sampling frequency calibration.\n\nBecause this hwc-\u003elast_period value is used as a period in\nperf_swevent_ hrtime(), every recorded sample will have an\nincorrected period of 1.\n\n  $ perf record -e task-clock noploop 1\n  [ perf record: Woken up 1 times to write data ]\n  [ perf record: Captured and wrote 0.158 MB perf.data (~6919 samples) ]\n\n  $ perf report -n --show-total-period  --stdio\n  # Samples: 4K of event \u0027task-clock\u0027\n  # Event count (approx.): 4000\n  #\n  # Overhead       Samples        Period  Command  Shared Object              Symbol\n  # ........  ............  ............  .......  .............  ..................\n  #\n      99.95%          3998          3998  noploop  noploop        [.] main\n       0.03%             1             1  noploop  libc-2.15.so   [.] init_cacheinfo\n       0.03%             1             1  noploop  ld-2.15.so     [.] open_verify\n\nNote that it doesn\u0027t affect the non-sampling event so that the\nperf stat still gets correct value with or without this patch.\n\n  $ perf stat -e task-clock noploop 1\n\n   Performance counter stats for \u0027noploop 1\u0027:\n\n         1000.272525 task-clock                #    1.000 CPUs utilized\n\n         1.000560605 seconds time elapsed\n\nSigned-off-by: Namhyung Kim \u003cnamhyung@kernel.org\u003e\nCc: Arnaldo Carvalho de Melo \u003cacme@ghostprotocols.net\u003e\nCc: Jiri Olsa \u003cjolsa@redhat.com\u003e\nCc: Namhyung Kim \u003cnamhyung.kim@lge.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nLink: http://lkml.kernel.org/r/1363574507-18808-1-git-send-email-namhyung@kernel.org\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\n"
    },
    {
      "commit": "613f04a0f51e6e68ac6fe571ab79da3c0a5eb4da",
      "tree": "2bc6da65edff6669f68010a22595861af26fe44d",
      "parents": [
        "80902822658aab18330569587cdb69ac1dfdcea8"
      ],
      "author": {
        "name": "Steven Rostedt (Red Hat)",
        "email": "rostedt@goodmis.org",
        "time": "Thu Mar 14 15:03:53 2013 -0400"
      },
      "committer": {
        "name": "Steven Rostedt",
        "email": "rostedt@goodmis.org",
        "time": "Thu Mar 14 23:40:21 2013 -0400"
      },
      "message": "tracing: Prevent buffer overwrite disabled for latency tracers\n\nThe latency tracers require the buffers to be in overwrite mode,\notherwise they get screwed up. Force the buffers to stay in overwrite\nmode when latency tracers are enabled.\n\nAdded a flag_changed() method to the tracer structure to allow\nthe tracers to see what flags are being changed, and also be able\nto prevent the change from happing.\n\nCc: stable@vger.kernel.org\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\n"
    },
    {
      "commit": "80902822658aab18330569587cdb69ac1dfdcea8",
      "tree": "552d06bf6a7dfcc6c392d7103cfc84e725545c75",
      "parents": [
        "69d34da2984c95b33ea21518227e1f9470f11d95"
      ],
      "author": {
        "name": "Steven Rostedt (Red Hat)",
        "email": "rostedt@goodmis.org",
        "time": "Thu Mar 14 14:20:54 2013 -0400"
      },
      "committer": {
        "name": "Steven Rostedt",
        "email": "rostedt@goodmis.org",
        "time": "Thu Mar 14 23:40:15 2013 -0400"
      },
      "message": "tracing: Keep overwrite in sync between regular and snapshot buffers\n\nChanging the overwrite mode for the ring buffer via the trace\noption only sets the normal buffer. But the snapshot buffer could\nswap with it, and then the snapshot would be in non overwrite mode\nand the normal buffer would be in overwrite mode, even though the\noption flag states otherwise.\n\nKeep the two buffers overwrite modes in sync.\n\nCc: stable@vger.kernel.org\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\n"
    },
    {
      "commit": "69d34da2984c95b33ea21518227e1f9470f11d95",
      "tree": "d7e414084fd0d64d6e7dd87f7d2e42961c323764",
      "parents": [
        "740466bc89ad8bd5afcc8de220f715f62b21e365"
      ],
      "author": {
        "name": "Steven Rostedt (Red Hat)",
        "email": "rostedt@goodmis.org",
        "time": "Thu Mar 14 13:50:56 2013 -0400"
      },
      "committer": {
        "name": "Steven Rostedt",
        "email": "rostedt@goodmis.org",
        "time": "Thu Mar 14 13:50:56 2013 -0400"
      },
      "message": "tracing: Protect tracer flags with trace_types_lock\n\nSeems that the tracer flags have never been protected from\nsynchronous writes. Luckily, admins don\u0027t usually modify the\ntracing flags via two different tasks. But if scripts were to\nbe used to modify them, then they could get corrupted.\n\nMove the trace_types_lock that protects against tracers changing\nto also protect the flags being set.\n\nCc: stable@vger.kernel.org\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\n"
    },
    {
      "commit": "0b34083f46c3784c6535dc9742dc13653ec1908d",
      "tree": "fec964226f201b3aed008589b8eae7b0883d5bfb",
      "parents": [
        "aea8b5d1e5c5482e7cdda849dc16d728f7080289",
        "740466bc89ad8bd5afcc8de220f715f62b21e365"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Thu Mar 14 08:12:20 2013 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@kernel.org",
        "time": "Thu Mar 14 08:12:20 2013 +0100"
      },
      "message": "Merge branch \u0027tip/perf/urgent-2\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent\n\nPull tracing fixes from Steven Rostedt.\n\nSigned-off-by: Ingo Molnar \u003cmingo@kernel.org\u003e\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": "842d223f28c4a4a6fe34df2d613049d4e47446c1",
      "tree": "fe24924112a915651eb8cc2c03836a695db6b7d7",
      "parents": [
        "ad8395e149e86ca3a76b6ae300c0d0a92b7f7e17",
        "59bfbcf01967d4d3370a2b8294673dd709e732cc"
      ],
      "author": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 13 15:21:57 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 13 15:21:57 2013 -0700"
      },
      "message": "Merge branch \u0027akpm\u0027 (fixes from Andrew)\n\nMerge misc fixes from Andrew Morton:\n\n - A bunch of fixes\n\n - Finish off the idr API conversions before someone starts to use the\n   old interfaces again.\n\n* emailed patches from Andrew Morton \u003cakpm@linux-foundation.org\u003e:\n  idr: idr_alloc() shouldn\u0027t trigger lowmem warning when preloaded\n  UAPI: fix endianness conditionals in M32R\u0027s asm/stat.h\n  UAPI: fix endianness conditionals in linux/raid/md_p.h\n  UAPI: fix endianness conditionals in linux/acct.h\n  UAPI: fix endianness conditionals in linux/aio_abi.h\n  decompressors: fix typo \"POWERPC\"\n  mm/fremap.c: fix oops on error path\n  idr: deprecate idr_pre_get() and idr_get_new[_above]()\n  tidspbridge: convert to idr_alloc()\n  zcache: convert to idr_alloc()\n  mlx4: remove leftover idr_pre_get() call\n  workqueue: convert to idr_alloc()\n  nfsd: convert to idr_alloc()\n  nfsd: remove unused get_new_stid()\n  kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER\n  signal: always clear sa_restorer on execve\n  mm: remove_memory(): fix end_pfn setting\n  include/linux/res_counter.h needs errno.h\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": "522cff142d7d2f9230839c9e1f21a4d8bcc22a4a",
      "tree": "b9dcee306ef4e6141ac6ba3d3efd338f6fcfb26c",
      "parents": [
        "2ca39528c01a933f6689cd6505ce65bd6d68a530"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@linux-foundation.org",
        "time": "Wed Mar 13 14:59:34 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 13 15:21:45 2013 -0700"
      },
      "message": "kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER\n\n__ARCH_HAS_SA_RESTORER is the preferred conditional for use in 3.9 and\nlater kernels, per Kees.\n\nCc: Emese Revfy \u003cre.emese@gmail.com\u003e\nCc: Emese Revfy \u003cre.emese@gmail.com\u003e\nCc: PaX Team \u003cpageexec@freemail.hu\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: Serge Hallyn \u003cserge.hallyn@canonical.com\u003e\nCc: Julien Tinnes \u003cjln@google.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "2ca39528c01a933f6689cd6505ce65bd6d68a530",
      "tree": "dac5eb0adf524fcfe14558ad8e24b076f61951e4",
      "parents": [
        "f8749452adcddd62e3707709ec2ae4856e70a3f2"
      ],
      "author": {
        "name": "Kees Cook",
        "email": "keescook@chromium.org",
        "time": "Wed Mar 13 14:59:33 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 13 15:21:44 2013 -0700"
      },
      "message": "signal: always clear sa_restorer on execve\n\nWhen the new signal handlers are set up, the location of sa_restorer is\nnot cleared, leaking a parent process\u0027s address space location to\nchildren.  This allows for a potential bypass of the parent\u0027s ASLR by\nexamining the sa_restorer value returned when calling sigaction().\n\nBased on what should be considered \"secret\" about addresses, it only\nmatters across the exec not the fork (since the VMAs haven\u0027t changed\nuntil the exec).  But since exec sets SIG_DFL and keeps sa_restorer,\nthis is where it should be fixed.\n\nGiven the few uses of sa_restorer, a \"set\" function was not written\nsince this would be the only use.  Instead, we use\n__ARCH_HAS_SA_RESTORER, as already done in other places.\n\nExample of the leak before applying this patch:\n\n  $ cat /proc/$$/maps\n  ...\n  7fb9f3083000-7fb9f3238000 r-xp 00000000 fd:01 404469 .../libc-2.15.so\n  ...\n  $ ./leak\n  ...\n  7f278bc74000-7f278be29000 r-xp 00000000 fd:01 404469 .../libc-2.15.so\n  ...\n  1 0 (nil) 0x7fb9f30b94a0\n  2 4000000 (nil) 0x7f278bcaa4a0\n  3 4000000 (nil) 0x7f278bcaa4a0\n  4 0 (nil) 0x7fb9f30b94a0\n  ...\n\n[akpm@linux-foundation.org: use SA_RESTORER for backportability]\nSigned-off-by: Kees Cook \u003ckeescook@chromium.org\u003e\nReported-by: Emese Revfy \u003cre.emese@gmail.com\u003e\nCc: Emese Revfy \u003cre.emese@gmail.com\u003e\nCc: PaX Team \u003cpageexec@freemail.hu\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nCc: Serge Hallyn \u003cserge.hallyn@canonical.com\u003e\nCc: Julien Tinnes \u003cjln@google.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e66eded8309ebf679d3d3c1f5820d1f2ca332c71",
      "tree": "768e1d799f6d6a4a7f85f48d9e9fc431dc8d017c",
      "parents": [
        "6c23cbbd5056b155401b0a2b5567d530e6c750c4"
      ],
      "author": {
        "name": "Eric W. Biederman",
        "email": "ebiederm@xmission.com",
        "time": "Wed Mar 13 11:51:49 2013 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Mar 13 15:00:20 2013 -0700"
      },
      "message": "userns: Don\u0027t allow CLONE_NEWUSER | CLONE_FS\n\nDon\u0027t allowing sharing the root directory with processes in a\ndifferent user namespace.  There doesn\u0027t seem to be any point, and to\nallow it would require the overhead of putting a user namespace\nreference in fs_struct (for permission checks) and incrementing that\nreference count on practically every call to fork.\n\nSo just perform the inexpensive test of forbidding sharing fs_struct\nacrosss processes in different user namespaces.  We already disallow\nother forms of threading when unsharing a user namespace so this\nshould be no real burden in practice.\n\nThis updates setns, clone, and unshare to disallow multiple user\nnamespaces sharing an fs_struct.\n\nCc: stable@vger.kernel.org\nSigned-off-by: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "740466bc89ad8bd5afcc8de220f715f62b21e365",
      "tree": "e2226505f6f4d248adbd7fb448f40e949f899126",
      "parents": [
        "2721e72dd10f71a3ba90f59781becf02638aa0d9"
      ],
      "author": {
        "name": "Steven Rostedt (Red Hat)",
        "email": "rostedt@goodmis.org",
        "time": "Wed Mar 13 11:15:19 2013 -0400"
      },
      "committer": {
        "name": "Steven Rostedt",
        "email": "rostedt@rostedt.homelinux.com",
        "time": "Wed Mar 13 17:57:44 2013 -0400"
      },
      "message": "tracing: Fix free of probe entry by calling call_rcu_sched()\n\nBecause function tracing is very invasive, and can even trace\ncalls to rcu_read_lock(), RCU access in function tracing is done\nwith preempt_disable_notrace(). This requires a synchronize_sched()\nfor updates and not a synchronize_rcu().\n\nFunction probes (traceon, traceoff, etc) must be freed after\na synchronize_sched() after its entry has been removed from the\nhash. But call_rcu() is used. Fix this by using call_rcu_sched().\n\nAlso fix the usage to use hlist_del_rcu() instead of hlist_del().\n\nCc: stable@vger.kernel.org\nCc: Paul McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\n"
    },
    {
      "commit": "6c23cbbd5056b155401b0a2b5567d530e6c750c4",
      "tree": "a0c0fbca6fee7ba2660c2f030c15b274f198930c",
      "parents": [
        "20f22ab42e9c832bde6e9a7ed04cdc73ec737e5b"
      ],
      "author": {
        "name": "Randy Dunlap",
        "email": "rdunlap@infradead.org",
        "time": "Tue Mar 05 10:00:24 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 12 20:42:10 2013 -0700"
      },
      "message": "futex: fix kernel-doc notation and spello\n\nFix kernel-doc warning in futex.c and convert \u0027Returns\u0027 to the new Return:\nkernel-doc notation format.\n\n  Warning(kernel/futex.c:2286): Excess function parameter \u0027clockrt\u0027 description in \u0027futex_wait_requeue_pi\u0027\n\nFix one spello.\n\nSigned-off-by: Randy Dunlap \u003crdunlap@infradead.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "20f22ab42e9c832bde6e9a7ed04cdc73ec737e5b",
      "tree": "c0390f77f2eb954ea8b04c8cdd837bbce21545b6",
      "parents": [
        "5857f70c8a62377c2304d8ad27e579881728fc5a"
      ],
      "author": {
        "name": "Randy Dunlap",
        "email": "rdunlap@infradead.org",
        "time": "Mon Mar 04 14:32:59 2013 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Mar 12 20:42:10 2013 -0700"
      },
      "message": "signals: fix new kernel-doc warnings\n\nFix new kernel-doc warnings in kernel/signal.c:\n\n  Warning(kernel/signal.c:2689): No description found for parameter \u0027uset\u0027\n  Warning(kernel/signal.c:2689): Excess function parameter \u0027set\u0027 description in \u0027sys_rt_sigpending\u0027\n\nSigned-off-by: Randy Dunlap \u003crdunlap@infradead.org\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\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"
    }
  ],
  "next": "e98d5b16cf4df992c40a7c83f1eae61db5bb03da"
}
