aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-01-03 08:49:46 -0500
committerSage Weil <sage@newdream.net>2011-01-12 18:15:14 -0500
commitf363e45fd1184219b472ea549cb7e192e24ef4d2 (patch)
tree1332feb2f7a0a47ce482a0fd4ee9afb547a27090 /include/linux/ceph
parent01e6acc4ea4c284c44bfb3d46c76f4ae580c6435 (diff)
net/ceph: make ceph_msgr_wq non-reentrant
ceph messenger code does a rather complex dancing around multithread workqueue to make sure the same work item isn't executed concurrently on different CPUs. This restriction can be provided by workqueue with WQ_NON_REENTRANT. Make ceph_msgr_wq non-reentrant workqueue with the default concurrency level and remove the QUEUED/BUSY logic. * This removes backoff handling in con_work() but it couldn't reliably block execution of con_work() to begin with - queue_con() can be called after the work started but before BUSY is set. It seems that it was an optimization for a rather cold path and can be safely removed. * The number of concurrent work items is bound by the number of connections and connetions are independent from each other. With the default concurrency level, different connections will be executed independently. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Sage Weil <sage@newdream.net> Cc: ceph-devel@vger.kernel.org Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/messenger.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index a108b425fee2..c3011beac30d 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -110,17 +110,12 @@ struct ceph_msg_pos {
110 110
111/* 111/*
112 * ceph_connection state bit flags 112 * ceph_connection state bit flags
113 *
114 * QUEUED and BUSY are used together to ensure that only a single
115 * thread is currently opening, reading or writing data to the socket.
116 */ 113 */
117#define LOSSYTX 0 /* we can close channel or drop messages on errors */ 114#define LOSSYTX 0 /* we can close channel or drop messages on errors */
118#define CONNECTING 1 115#define CONNECTING 1
119#define NEGOTIATING 2 116#define NEGOTIATING 2
120#define KEEPALIVE_PENDING 3 117#define KEEPALIVE_PENDING 3
121#define WRITE_PENDING 4 /* we have data ready to send */ 118#define WRITE_PENDING 4 /* we have data ready to send */
122#define QUEUED 5 /* there is work queued on this connection */
123#define BUSY 6 /* work is being done */
124#define STANDBY 8 /* no outgoing messages, socket closed. we keep 119#define STANDBY 8 /* no outgoing messages, socket closed. we keep
125 * the ceph_connection around to maintain shared 120 * the ceph_connection around to maintain shared
126 * state with the peer. */ 121 * state with the peer. */