From: Matan Breizman Date: Sun, 18 May 2025 12:38:23 +0000 (+0000) Subject: common/options/crimson: introduce crimson_poll_mode X-Git-Tag: v21.0.0~256^2~517^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ce14265d7bdc3ab83a63ebe041dbc286e66595b;p=ceph.git common/options/crimson: introduce crimson_poll_mode We shoudn't expect real deployments to enable this options (though it might be useful for some). Enabling poll mode could provide further insights on performance "potential" and help with discovering bottlenecks. Signed-off-by: Matan Breizman --- diff --git a/src/common/options/crimson.yaml.in b/src/common/options/crimson.yaml.in index f99ec372a61e..70026505eb7d 100644 --- a/src/common/options/crimson.yaml.in +++ b/src/common/options/crimson.yaml.in @@ -85,6 +85,17 @@ options: level: advanced default: 0 desc: Report OSD status periodically in seconds, 0 to disable + +- name: crimson_poll_mode + type: bool + level: advanced + default: false + desc: Let the seastar reactor poll continuously without sleeping at the expense of 100% cpu usage. + flags: + - startup + +# Seastore options + - name: seastore_segment_size type: size desc: Segment size to use for SegmentManager diff --git a/src/crimson/osd/main_config_bootstrap_helpers.cc b/src/crimson/osd/main_config_bootstrap_helpers.cc index d23cd8084561..c4667dc9f09a 100644 --- a/src/crimson/osd/main_config_bootstrap_helpers.cc +++ b/src/crimson/osd/main_config_bootstrap_helpers.cc @@ -95,7 +95,8 @@ struct SeastarOption { const std::vector seastar_options = { {"--task-quota-ms", "crimson_reactor_task_quota_ms", Option::TYPE_FLOAT}, {"--io-latency-goal-ms", "crimson_reactor_io_latency_goal_ms", Option::TYPE_FLOAT}, - {"--idle-poll-time-us", "crimson_reactor_idle_poll_time_us", Option::TYPE_UINT} + {"--idle-poll-time-us", "crimson_reactor_idle_poll_time_us", Option::TYPE_UINT}, + {"--poll-mode", "crimson_poll_mode", Option::TYPE_BOOL} }; // Function to get the option value as a string @@ -113,6 +114,12 @@ std::optional get_option_value(const SeastarOption& option) { } break; } + case Option::TYPE_BOOL: { + if (crimson::common::get_conf(option.config_key)) { + return "true"; + } + break; + } default: logger().warn("get_option_value --option_name {} encountered unknown type", option.config_key); return std::nullopt; @@ -184,7 +191,9 @@ _get_early_config(int argc, const char *argv[]) if (option_value) { logger().info("Configure option_name {} with value : {}", option.config_key, option_value); ret.early_args.emplace_back(option.option_name); - ret.early_args.emplace_back(*option_value); + if (option.value_type != Option::TYPE_BOOL) { + ret.early_args.emplace_back(*option_value); + } } } if (auto found = std::find_if(