]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net/ceph: make ceph_msgr_wq non-reentrant
authorTejun Heo <tj@kernel.org>
Mon, 3 Jan 2011 13:49:46 +0000 (14:49 +0100)
committerSage Weil <sage@newdream.net>
Wed, 12 Jan 2011 23:15:14 +0000 (15:15 -0800)
commitf363e45fd1184219b472ea549cb7e192e24ef4d2
tree1332feb2f7a0a47ce482a0fd4ee9afb547a27090
parent01e6acc4ea4c284c44bfb3d46c76f4ae580c6435
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>
include/linux/ceph/messenger.h
net/ceph/messenger.c