Skip to content

Commit

Permalink
OSD: add op_wq suicide timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Just <sjust@redhat.com>
  • Loading branch information
athanatos authored and theanalyst committed Jul 15, 2015
1 parent d20f513 commit a82b450
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -564,6 +564,7 @@ OPTION(osd_recover_clone_overlap_limit, OPT_INT, 10)
OPTION(osd_backfill_scan_min, OPT_INT, 64)
OPTION(osd_backfill_scan_max, OPT_INT, 512)
OPTION(osd_op_thread_timeout, OPT_INT, 15)
OPTION(osd_op_thread_suicide_timeout, OPT_INT, 150)
OPTION(osd_recovery_thread_timeout, OPT_INT, 30)
OPTION(osd_snap_trim_thread_timeout, OPT_INT, 60*60*1)
OPTION(osd_snap_trim_sleep, OPT_FLOAT, 0)
Expand Down
14 changes: 11 additions & 3 deletions src/osd/OSD.cc
Expand Up @@ -1543,9 +1543,17 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
op_tracker(cct, cct->_conf->osd_enable_op_tracker,
cct->_conf->osd_num_op_tracker_shard),
test_ops_hook(NULL),
op_shardedwq(cct->_conf->osd_op_num_shards, this,
cct->_conf->osd_op_thread_timeout, &osd_op_tp),
peering_wq(this, cct->_conf->osd_op_thread_timeout, &osd_tp),
op_shardedwq(
cct->_conf->osd_op_num_shards,
this,
cct->_conf->osd_op_thread_timeout,
cct->_conf->osd_op_thread_suicide_timeout,
&osd_op_tp),
peering_wq(
this,
cct->_conf->osd_op_thread_timeout,
cct->_conf->osd_op_thread_suicide_timeout,
&osd_tp),
map_lock("OSD::map_lock"),
pg_map_lock("OSD::pg_map_lock"),
debug_drop_pg_create_probability(cct->_conf->osd_debug_drop_pg_create_probability),
Expand Down
8 changes: 4 additions & 4 deletions src/osd/OSD.h
Expand Up @@ -1452,8 +1452,8 @@ class OSD : public Dispatcher,
uint32_t num_shards;

public:
ShardedOpWQ(uint32_t pnum_shards, OSD *o, time_t ti, ShardedThreadPool* tp):
ShardedThreadPool::ShardedWQ < pair <PGRef, OpRequestRef> >(ti, ti*10, tp),
ShardedOpWQ(uint32_t pnum_shards, OSD *o, time_t ti, time_t si, ShardedThreadPool* tp):
ShardedThreadPool::ShardedWQ < pair <PGRef, OpRequestRef> >(ti, si, tp),
osd(o), num_shards(pnum_shards) {
for(uint32_t i = 0; i < num_shards; i++) {
char lock_name[32] = {0};
Expand Down Expand Up @@ -1563,9 +1563,9 @@ class OSD : public Dispatcher,
list<PG*> peering_queue;
OSD *osd;
set<PG*> in_use;
PeeringWQ(OSD *o, time_t ti, ThreadPool *tp)
PeeringWQ(OSD *o, time_t ti, time_t si, ThreadPool *tp)
: ThreadPool::BatchWorkQueue<PG>(
"OSD::PeeringWQ", ti, ti*10, tp), osd(o) {}
"OSD::PeeringWQ", ti, si, tp), osd(o) {}

void _dequeue(PG *pg) {
for (list<PG*>::iterator i = peering_queue.begin();
Expand Down

0 comments on commit a82b450

Please sign in to comment.