]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Fix WBThrottle thread disappear problem 994/head
authorHaomai Wang <haomaiwang@gmail.com>
Thu, 26 Dec 2013 03:20:52 +0000 (11:20 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Thu, 26 Dec 2013 03:33:05 +0000 (11:33 +0800)
commitbf24317bcdab4a99b9fdabef7e84fa99fdbc6720
tree9dd9877c766ba8bf0a31b44a90f370f6df334e06
parent1349ba894a9ec308111e62d1d7766352b13223e3
Fix WBThrottle thread disappear problem

New ceph_osd.cc code did ObjectStore init work before global_init_daemonize(),
and WBThrottle thread is created when objectstore constructed. So after
daemon(), WBThrottle thread won't exist in new process. It will result in
deadlock.

When "cur_ios" which is member of WBThrottle hits hard limit, there exists two
ways to decrease "cur_ios". The first is WBThrottle thread which is dead if
deamonize, another is SyncThread. SyncThread will block at op_tp.pause()
because thread in op_tp(threadpool) block at
wbthrottle.throttle(FileStore::doop). So no thread will continue process jobs
in filestore layer and all threads is waiting.

Fix #7062 (http://tracker.ceph.com/issues/7062)

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/os/FileStore.cc
src/os/WBThrottle.cc
src/os/WBThrottle.h