From: Samuel Just Date: Wed, 6 May 2015 17:49:00 +0000 (-0700) Subject: OSD: add command_wq suicide timeout X-Git-Tag: v9.0.2~188^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df4e5de819c30003cfbe50a071c49039cf534419;p=ceph.git OSD: add command_wq suicide timeout Signed-off-by: Samuel Just --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 7c4ca61e8d00..1183df72e3e5 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -592,6 +592,7 @@ OPTION(osd_scrub_finalize_thread_timeout, OPT_INT, 60*10) OPTION(osd_scrub_invalid_stats, OPT_BOOL, true) OPTION(osd_remove_thread_timeout, OPT_INT, 60*60) OPTION(osd_command_thread_timeout, OPT_INT, 10*60) +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 88b08e556055..b6e04023a993 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1515,7 +1515,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, cct->_conf->osd_recovery_thread_timeout, &recovery_tp), replay_queue_lock("OSD::replay_queue_lock"), diff --git a/src/osd/OSD.h b/src/osd/OSD.h index e183544b487b..b90a0c9cb318 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1969,8 +1969,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();