diff options
author | Sage Weil <sage@inktank.com> | 2012-10-22 15:38:30 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-10-22 15:38:30 -0700 |
commit | d9b51b3b7011f4551fe27e33301b26cd23a72378 (patch) | |
tree | ac3a11e0f048ae6f0438de1524fc5684d827ef2e | |
parent | 852e27d3e19239a696fa693e2a30c3226d27a611 (diff) | |
download | ceph-d9b51b3b7011f4551fe27e33301b26cd23a72378.tar.gz |
workqueue: make debug output include active threads
Include active thread count in threadpool debug output.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/common/WorkQueue.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/WorkQueue.cc b/src/common/WorkQueue.cc index 5d50cdfd5da..12c3a9637e3 100644 --- a/src/common/WorkQueue.cc +++ b/src/common/WorkQueue.cc @@ -48,14 +48,16 @@ void ThreadPool::worker() void *item = wq->_void_dequeue(); if (item) { processing++; - ldout(cct,12) << "worker wq " << wq->name << " start processing " << item << dendl; + ldout(cct,15) << "worker wq " << wq->name << " start processing " << item + << " (" << processing << " active)" << dendl; _lock.Unlock(); cct->get_heartbeat_map()->reset_timeout(hb, wq->timeout_interval, wq->suicide_interval); wq->_void_process(item); _lock.Lock(); wq->_void_process_finish(item); - ldout(cct,15) << "worker wq " << wq->name << " done processing " << item << dendl; processing--; + ldout(cct,15) << "worker wq " << wq->name << " done processing " << item + << " (" << processing << " active)" << dendl; if (_pause || _draining) _wait_cond.Signal(); did = true; @@ -66,7 +68,7 @@ void ThreadPool::worker() continue; } - ldout(cct,15) << "worker waiting" << dendl; + ldout(cct,20) << "worker waiting" << dendl; cct->get_heartbeat_map()->reset_timeout(hb, 4, 0); _cond.WaitInterval(cct, _lock, utime_t(2, 0)); } |