mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
osd: kill disk_tp, recovery_gen_wq
Progress! Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
e5c336851c
commit
3a331c8be2
@ -607,9 +607,6 @@ OPTION(osd_max_markdown_count, OPT_INT)
|
||||
|
||||
OPTION(osd_op_pq_max_tokens_per_priority, OPT_U64)
|
||||
OPTION(osd_op_pq_min_cost, OPT_U64)
|
||||
OPTION(osd_disk_threads, OPT_INT)
|
||||
OPTION(osd_disk_thread_ioprio_class, OPT_STR) // rt realtime be best effort idle
|
||||
OPTION(osd_disk_thread_ioprio_priority, OPT_INT) // 0-7
|
||||
OPTION(osd_recover_clone_overlap, OPT_BOOL) // preserve clone_overlap during recovery/migration
|
||||
OPTION(osd_op_num_threads_per_shard, OPT_INT)
|
||||
OPTION(osd_op_num_threads_per_shard_hdd, OPT_INT)
|
||||
@ -668,8 +665,6 @@ OPTION(osd_backfill_scan_min, OPT_INT)
|
||||
OPTION(osd_backfill_scan_max, OPT_INT)
|
||||
OPTION(osd_op_thread_timeout, OPT_INT)
|
||||
OPTION(osd_op_thread_suicide_timeout, OPT_INT)
|
||||
OPTION(osd_recovery_thread_timeout, OPT_INT)
|
||||
OPTION(osd_recovery_thread_suicide_timeout, OPT_INT)
|
||||
OPTION(osd_recovery_sleep, OPT_FLOAT) // seconds to sleep between recovery ops
|
||||
OPTION(osd_recovery_sleep_hdd, OPT_FLOAT)
|
||||
OPTION(osd_recovery_sleep_ssd, OPT_FLOAT)
|
||||
|
@ -2233,14 +2233,6 @@ std::vector<Option> get_global_options() {
|
||||
.set_default(1)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_disk_thread_ioprio_class", Option::TYPE_STR, Option::LEVEL_ADVANCED)
|
||||
.set_default("")
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_disk_thread_ioprio_priority", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(-1)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_recover_clone_overlap", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
|
||||
.set_default(true)
|
||||
.set_description(""),
|
||||
@ -2778,14 +2770,6 @@ std::vector<Option> get_global_options() {
|
||||
.set_default(150)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_recovery_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(30)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_recovery_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(300)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_recovery_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
|
||||
.set_default(0)
|
||||
.set_description("Time in seconds to sleep before next recovery or backfill op"),
|
||||
|
@ -226,8 +226,6 @@ OSDService::OSDService(OSD *osd) :
|
||||
logger(osd->logger),
|
||||
recoverystate_perf(osd->recoverystate_perf),
|
||||
monc(osd->monc),
|
||||
recovery_gen_wq("recovery_gen_wq", cct->_conf->osd_recovery_thread_timeout,
|
||||
&osd->disk_tp),
|
||||
class_handler(osd->class_handler),
|
||||
osd_max_object_size(*cct->_conf, "osd_max_object_size"),
|
||||
osd_skip_data_digest(*cct->_conf, "osd_skip_data_digest"),
|
||||
@ -2012,7 +2010,6 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
|
||||
osd_compat(get_osd_compat_set()),
|
||||
osd_op_tp(cct, "OSD::osd_op_tp", "tp_osd_tp",
|
||||
get_num_op_threads()),
|
||||
disk_tp(cct, "OSD::disk_tp", "tp_osd_disk", cct->_conf->osd_disk_threads, "osd_disk_threads"),
|
||||
command_tp(cct, "OSD::command_tp", "tp_osd_cmd", 1),
|
||||
session_waiting_lock("OSD::session_waiting_lock"),
|
||||
osdmap_subscribe_lock("OSD::osdmap_subscribe_lock"),
|
||||
@ -2695,11 +2692,8 @@ int OSD::init()
|
||||
update_log_config();
|
||||
|
||||
osd_op_tp.start();
|
||||
disk_tp.start();
|
||||
command_tp.start();
|
||||
|
||||
set_disk_tp_priority();
|
||||
|
||||
// start the heartbeat
|
||||
heartbeat_thread.create("osd_srv_heartbt");
|
||||
|
||||
@ -3454,10 +3448,6 @@ int OSD::shutdown()
|
||||
command_tp.stop();
|
||||
dout(10) << "command tp stopped" << dendl;
|
||||
|
||||
disk_tp.drain();
|
||||
disk_tp.stop();
|
||||
dout(10) << "disk tp paused (new)" << dendl;
|
||||
|
||||
dout(10) << "stopping agent" << dendl;
|
||||
service.agent_stop();
|
||||
|
||||
@ -9137,10 +9127,6 @@ void OSD::handle_conf_change(const struct md_config_t *conf,
|
||||
if (changed.count("osd_enable_op_tracker")) {
|
||||
op_tracker.set_tracking(cct->_conf->osd_enable_op_tracker);
|
||||
}
|
||||
if (changed.count("osd_disk_thread_ioprio_class") ||
|
||||
changed.count("osd_disk_thread_ioprio_priority")) {
|
||||
set_disk_tp_priority();
|
||||
}
|
||||
if (changed.count("osd_map_cache_size")) {
|
||||
service.map_cache.set_size(cct->_conf->osd_map_cache_size);
|
||||
service.map_bl_cache.set_size(cct->_conf->osd_map_cache_size);
|
||||
@ -9226,25 +9212,6 @@ void OSD::check_config()
|
||||
}
|
||||
}
|
||||
|
||||
void OSD::set_disk_tp_priority()
|
||||
{
|
||||
dout(10) << __func__
|
||||
<< " class " << cct->_conf->osd_disk_thread_ioprio_class
|
||||
<< " priority " << cct->_conf->osd_disk_thread_ioprio_priority
|
||||
<< dendl;
|
||||
if (cct->_conf->osd_disk_thread_ioprio_class.empty() ||
|
||||
cct->_conf->osd_disk_thread_ioprio_priority < 0)
|
||||
return;
|
||||
int cls =
|
||||
ceph_ioprio_string_to_class(cct->_conf->osd_disk_thread_ioprio_class);
|
||||
if (cls < 0)
|
||||
derr << __func__ << cpp_strerror(cls) << ": "
|
||||
<< "osd_disk_thread_ioprio_class is " << cct->_conf->osd_disk_thread_ioprio_class
|
||||
<< " but only the following values are allowed: idle, be or rt" << dendl;
|
||||
else
|
||||
disk_tp.set_ioprio(cls, cct->_conf->osd_disk_thread_ioprio_priority);
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
|
||||
void OSD::get_latest_osdmap()
|
||||
|
@ -274,7 +274,6 @@ public:
|
||||
PerfCounters *&logger;
|
||||
PerfCounters *&recoverystate_perf;
|
||||
MonClient *&monc;
|
||||
GenContextWQ recovery_gen_wq;
|
||||
ClassHandler *&class_handler;
|
||||
|
||||
md_config_cacher_t<uint64_t> osd_max_object_size;
|
||||
@ -1317,10 +1316,8 @@ public:
|
||||
private:
|
||||
|
||||
ShardedThreadPool osd_op_tp;
|
||||
ThreadPool disk_tp;
|
||||
ThreadPool command_tp;
|
||||
|
||||
void set_disk_tp_priority();
|
||||
void get_latest_osdmap();
|
||||
|
||||
// -- sessions --
|
||||
|
Loading…
Reference in New Issue
Block a user