From: Samuel Just Date: Wed, 6 May 2015 17:49:00 +0000 (-0700) Subject: OSD: add command_wq suicide timeout X-Git-Tag: v0.94.3~39^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F5159%2Fhead;p=ceph.git OSD: add command_wq suicide timeout Signed-off-by: Samuel Just (cherry picked from commit df4e5de819c30003cfbe50a071c49039cf534419) Conflicts: src/common/config_opts.h Trivial merge conflict --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index e6b9ad908563..a5ba7d937664 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -579,6 +579,7 @@ OPTION(osd_remove_thread_suicide_timeout, OPT_INT, 10*60*60) OPTION(osd_command_thread_timeout, OPT_INT, 10*60) OPTION(osd_age, OPT_FLOAT, .8) OPTION(osd_age_time, OPT_INT, 0) +OPTION(osd_command_thread_suicide_timeout, OPT_INT, 15*60) OPTION(osd_heartbeat_addr, OPT_ADDR, entity_addr_t()) OPTION(osd_heartbeat_interval, OPT_INT, 6) // (seconds) how often we ping peers OPTION(osd_heartbeat_grace, OPT_INT, 20) // (seconds) how long before we decide a peer has failed diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 3c7198bdf291..7dbcfc5ae603 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1565,7 +1565,11 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_, pg_stat_queue_lock("OSD::pg_stat_queue_lock"), osd_stat_updated(false), pg_stat_tid(0), pg_stat_tid_flushed(0), - command_wq(this, cct->_conf->osd_command_thread_timeout, &command_tp), + command_wq( + this, + cct->_conf->osd_command_thread_timeout, + cct->_conf->osd_command_thread_suicide_timeout, + &command_tp), recovery_ops_active(0), recovery_wq( this, diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 6621f2224801..f5021ef159bb 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1944,8 +1944,8 @@ protected: list command_queue; struct CommandWQ : public ThreadPool::WorkQueue { OSD *osd; - CommandWQ(OSD *o, time_t ti, ThreadPool *tp) - : ThreadPool::WorkQueue("OSD::CommandWQ", ti, 0, tp), osd(o) {} + CommandWQ(OSD *o, time_t ti, time_t si, ThreadPool *tp) + : ThreadPool::WorkQueue("OSD::CommandWQ", ti, si, tp), osd(o) {} bool _empty() { return osd->command_queue.empty();