@@ -84,6 +84,41 @@ seastar::future<> populate_config_from_mon()
8484 });
8585}
8686
87+ struct SeastarOption {
88+ std::string option_name; // Command-line option name
89+ std::string config_key; // Configuration key
90+ Option::type_t value_type ; // Type of configuration value
91+ };
92+
93+ // Define a list of Seastar options
94+ const std::vector<SeastarOption> seastar_options = {
95+ {" --task-quota-ms" , " crimson_reactor_task_quota_ms" , Option::TYPE_FLOAT},
96+ {" --io-latency-goal-ms" , " crimson_reactor_io_latency_goal_ms" , Option::TYPE_FLOAT},
97+ {" --idle-poll-time-us" , " crimson_reactor_idle_poll_time_us" , Option::TYPE_UINT}
98+ };
99+
100+ // Function to get the option value as a string
101+ std::optional<std::string> get_option_value (const SeastarOption& option) {
102+ switch (option.value_type ) {
103+ case Option::TYPE_FLOAT: {
104+ if (auto value = crimson::common::get_conf<double >(option.config_key )) {
105+ return std::to_string (value);
106+ }
107+ break ;
108+ }
109+ case Option::TYPE_UINT: {
110+ if (auto value = crimson::common::get_conf<uint64_t >(option.config_key )) {
111+ return std::to_string (value);
112+ }
113+ break ;
114+ }
115+ default :
116+ logger ().warn (" get_option_value --option_name {} encountered unknown type" , option.config_key );
117+ return std::nullopt ;
118+ }
119+ return std::nullopt ;
120+ }
121+
87122static tl::expected<early_config_t , int >
88123_get_early_config (int argc, const char *argv[])
89124{
@@ -143,6 +178,14 @@ _get_early_config(int argc, const char *argv[])
143178 std::begin (early_args),
144179 std::end (early_args));
145180
181+ for (const auto & option : seastar_options) {
182+ auto option_value = get_option_value (option);
183+ if (option_value) {
184+ logger ().info (" Configure option_name {} with value : {}" , option.config_key , option_value);
185+ ret.early_args .emplace_back (option.option_name );
186+ ret.early_args .emplace_back (*option_value);
187+ }
188+ }
146189 if (auto found = std::find_if (
147190 std::begin (early_args),
148191 std::end (early_args),
0 commit comments