diff mbox

[2/2] libceph: mark ceph_msgr_wq unbounded

Message ID 5074974A.3010000@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Elder Oct. 9, 2012, 9:29 p.m. UTC
Andreas Bluemle observed an undesirable behavior in the ceph
messenger when using networking hardware that binds received data
handling to a single CPU.  The messenger uses a workqueue to process
message activity, and in this case all work was being queued on the
same per-cpu workqueue.  Consequently that CPU becomes a bottleneck,
forced to process all incoming messages.

Marking the workqueue UNBOUND allows any available CPU to process a
work item on the queue.  The concurrency of the workqueue will be
limited by the number of active connections.

Reported-by: Andreas Bluemle <andreas.bluemle@itxperts.de>
Signed-off-by: Alex Elder <elder@inktank.com>
---
  net/ceph/messenger.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 28ed904..f9f65fe 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -190,7 +190,7 @@  int ceph_msgr_init(void)
  	zero_page = ZERO_PAGE(0);
  	page_cache_get(zero_page);

-	ceph_msgr_wq = alloc_workqueue("ceph-msgr", 0, 0);
+	ceph_msgr_wq = alloc_workqueue("ceph-msgr", WQ_UNBOUND, 0);
  	if (ceph_msgr_wq)
  		return 0;