From: Tejun Heo Date: Mon, 9 Mar 2015 13:22:28 +0000 (-0400) Subject: workqueue: make the workqueues list RCU walkable X-Git-Tag: omap-for-v4.1/fixes-rc1~170^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2dca7adff8f3fae0ab250a6362798550b3c79ee;p=pandora-kernel.git workqueue: make the workqueues list RCU walkable The workqueues list is protected by wq_pool_mutex and a workqueue and its subordinate data structures are freed directly on destruction. We want to add the ability dump workqueues from a sysrq callback which requires walking all workqueues without grabbing wq_pool_mutex. This patch makes freeing of workqueues RCU protected and makes the workqueues list walkable while holding RCU read lock. Note that pool_workqueues and pools are already sched-RCU protected. For consistency, workqueues are also protected with sched-RCU. While at it, reverse the workqueues list so that a workqueue which is created earlier comes before. The order of the list isn't significant functionally but this makes the planned sysrq dump list system workqueues first. Signed-off-by: Tejun Heo --- Reading git-diff-tree failed