Skip to content

Commit

Permalink
Merge pull request #21339 from guzhongyan/tp-cleanup
Browse files Browse the repository at this point in the history
osd: drop unused osd_disk_tp related options

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
yuriw committed Apr 27, 2018
2 parents 2c98007 + 35a4b50 commit 6a79262
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/common/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2270,10 +2270,6 @@ std::vector<Option> get_global_options() {
.set_default(65536)
.set_description(""),

Option("osd_disk_threads", 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(""),
Expand Down
3 changes: 0 additions & 3 deletions src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#include "common/ceph_argparse.h"
#include "common/ceph_time.h"
#include "common/version.h"
#include "common/io_priority.h"
#include "common/pick_address.h"
#include "common/SubProcess.h"
#include "common/PluginRegistry.h"
Expand Down Expand Up @@ -8989,8 +8988,6 @@ const char** OSD::get_tracked_conf_keys() const
"osd_map_cache_size",
"osd_pg_epoch_max_lag_factor",
"osd_pg_epoch_persisted_max_stale",
"osd_disk_thread_ioprio_class",
"osd_disk_thread_ioprio_priority",
// clog & admin clog
"clog_to_monitors",
"clog_to_syslog",
Expand Down
12 changes: 6 additions & 6 deletions src/test/test_workqueue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@ TEST(WorkQueue, StartStop)

TEST(WorkQueue, Resize)
{
ThreadPool tp(g_ceph_context, "bar", "tp_bar", 2, "osd_disk_threads");
ThreadPool tp(g_ceph_context, "bar", "tp_bar", 2, "filestore_op_threads");

tp.start();

sleep(1);
ASSERT_EQ(2, tp.get_num_threads());

g_conf->set_val("osd disk threads", "5");
g_conf->set_val("filestore op threads", "5");
g_conf->apply_changes(&cout);
sleep(1);
ASSERT_EQ(5, tp.get_num_threads());

g_conf->set_val("osd disk threads", "3");
g_conf->set_val("filestore op threads", "3");
g_conf->apply_changes(&cout);
sleep(1);
ASSERT_EQ(3, tp.get_num_threads());

g_conf->set_val("osd disk threads", "0");
g_conf->set_val("filestore op threads", "0");
g_conf->apply_changes(&cout);
sleep(1);
ASSERT_EQ(0, tp.get_num_threads());

g_conf->set_val("osd disk threads", "15");
g_conf->set_val("filestore op threads", "15");
g_conf->apply_changes(&cout);
sleep(1);
ASSERT_EQ(15, tp.get_num_threads());

g_conf->set_val("osd disk threads", "-1");
g_conf->set_val("filestore op threads", "-1");
g_conf->apply_changes(&cout);
sleep(1);
ASSERT_EQ(15, tp.get_num_threads());
Expand Down

0 comments on commit 6a79262

Please sign in to comment.