From: Yingxin Cheng Date: Thu, 25 May 2023 06:18:58 +0000 (+0800) Subject: crimson/tools/perf_crimson_msgr: add server multi core option X-Git-Tag: v18.2.1~129^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5cdbe2ad654fa6e1b4bebd384d89c9e505a9b021;p=ceph.git crimson/tools/perf_crimson_msgr: add server multi core option Signed-off-by: Yingxin Cheng (cherry picked from commit 0d170bd9df853180908de79258f4ad0eeb0bbc6e) --- diff --git a/src/crimson/tools/perf_crimson_msgr.cc b/src/crimson/tools/perf_crimson_msgr.cc index 566abd7ba8435..333eb6262cae5 100644 --- a/src/crimson/tools/perf_crimson_msgr.cc +++ b/src/crimson/tools/perf_crimson_msgr.cc @@ -115,12 +115,14 @@ struct client_config { struct server_config { entity_addr_t addr; unsigned block_size; + bool is_fixed_cpu; unsigned core; std::string str() const { std::ostringstream out; out << "server[" << addr << "](bs=" << block_size + << ", is_fixed_cpu=" << is_fixed_cpu << ", core=" << core << ")"; return out.str(); @@ -134,7 +136,10 @@ struct server_config { conf.addr = addr; conf.block_size = options["server-bs"].as(); + conf.is_fixed_cpu = options["server-fixed-cpu"].as(); conf.core = options["server-core"].as(); + // TODO + ceph_assert_always(conf.is_fixed_cpu == false); return conf; } }; @@ -801,6 +806,7 @@ static seastar::future<> run( std::optional server_sid; bool server_needs_report = false; if (mode == perf_mode_t::both) { + ceph_assert(server_conf.is_fixed_cpu == true); server_sid = server_conf.core; } else if (mode == perf_mode_t::server) { server_needs_report = true; @@ -898,6 +904,8 @@ int main(int argc, char** argv) "client block size") ("depth", bpo::value()->default_value(512), "client io depth") + ("server-fixed-cpu", bpo::value()->default_value(true), + "server is in the fixed cpu mode, non-fixed doesn't support the mode both") ("server-core", bpo::value()->default_value(1), "server running core") ("server-bs", bpo::value()->default_value(0),