From: Tejun Heo <tj@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: laijs@cn.fujitsu.com, Tejun Heo <tj@kernel.org>
Subject: [PATCH 4/7] workqueue: relocate global variable defs and function decls in workqueue.c
Date: Wed, 13 Mar 2013 19:57:22 -0700 [thread overview]
Message-ID: <1363229845-6831-5-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1363229845-6831-1-git-send-email-tj@kernel.org>
They're split across debugobj code for some reason. Collect them.
This patch is pure relocation.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
kernel/workqueue.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ce1ab06..9a0cbb2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -248,6 +248,21 @@ struct workqueue_struct {
static struct kmem_cache *pwq_cache;
+/* Serializes the accesses to the list of workqueues. */
+static DEFINE_SPINLOCK(workqueue_lock);
+static LIST_HEAD(workqueues);
+static bool workqueue_freezing; /* W: have wqs started freezing? */
+
+/* the per-cpu worker pools */
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],
+ cpu_worker_pools);
+
+/*
+ * R: idr of all pools. Modifications are protected by workqueue_lock.
+ * Read accesses are protected by sched-RCU protected.
+ */
+static DEFINE_IDR(worker_pool_idr);
+
/* W: hash of all unbound pools keyed by pool->attrs */
static DEFINE_HASHTABLE(unbound_pool_hash, UNBOUND_POOL_HASH_ORDER);
@@ -265,6 +280,10 @@ EXPORT_SYMBOL_GPL(system_unbound_wq);
struct workqueue_struct *system_freezable_wq __read_mostly;
EXPORT_SYMBOL_GPL(system_freezable_wq);
+static int worker_thread(void *__worker);
+static void copy_workqueue_attrs(struct workqueue_attrs *to,
+ const struct workqueue_attrs *from);
+
#define CREATE_TRACE_POINTS
#include <trace/events/workqueue.h>
@@ -431,25 +450,6 @@ static inline void debug_work_activate(struct work_struct *work) { }
static inline void debug_work_deactivate(struct work_struct *work) { }
#endif
-/* Serializes the accesses to the list of workqueues. */
-static DEFINE_SPINLOCK(workqueue_lock);
-static LIST_HEAD(workqueues);
-static bool workqueue_freezing; /* W: have wqs started freezing? */
-
-/* the per-cpu worker pools */
-static DEFINE_PER_CPU_SHARED_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],
- cpu_worker_pools);
-
-/*
- * R: idr of all pools. Modifications are protected by workqueue_lock.
- * Read accesses are protected by sched-RCU protected.
- */
-static DEFINE_IDR(worker_pool_idr);
-
-static int worker_thread(void *__worker);
-static void copy_workqueue_attrs(struct workqueue_attrs *to,
- const struct workqueue_attrs *from);
-
/* allocate ID and assign it to @pool */
static int worker_pool_assign_id(struct worker_pool *pool)
{
--
1.8.1.4
next prev parent reply other threads:[~2013-03-14 2:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 2:57 [PATCHSET wq/for-3.10] workqueue: break up workqueue_lock into multiple locks Tejun Heo
2013-03-14 2:57 ` [PATCH 1/7] workqueue: rename worker_pool->assoc_mutex to ->manager_mutex Tejun Heo
2013-03-14 16:00 ` Lai Jiangshan
2013-03-14 16:41 ` Tejun Heo
2013-03-14 2:57 ` [PATCH 2/7] workqueue: factor out initial worker creation into create_and_start_worker() Tejun Heo
2013-03-14 2:57 ` [PATCH 3/7] workqueue: better define locking rules around worker creation / destruction Tejun Heo
2013-03-14 2:57 ` Tejun Heo [this message]
2013-03-14 2:57 ` [PATCH 5/7] workqueue: separate out pool and workqueue locking into wq_mutex Tejun Heo
2013-03-14 2:57 ` [PATCH 6/7] workqueue: separate out pool_workqueue locking into pwq_lock Tejun Heo
2013-03-14 2:57 ` [PATCH 7/7] workqueue: rename workqueue_lock to wq_mayday_lock Tejun Heo
2013-03-18 19:51 ` [PATCHSET wq/for-3.10] workqueue: break up workqueue_lock into multiple locks Tejun Heo
2013-03-20 14:01 ` JoonSoo Kim
2013-03-20 14:38 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363229845-6831-5-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox