]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/tools/perf_crimson_msgr: add server multi core option
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 25 May 2023 06:18:58 +0000 (14:18 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 3 Jul 2023 05:50:18 +0000 (13:50 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/tools/perf_crimson_msgr.cc

index 566abd7ba84356af688d63ef46f6902fde0b1dec..333eb6262cae5791fb17433cbc293d54f6ccae6b 100644 (file)
@@ -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<unsigned>();
+    conf.is_fixed_cpu = options["server-fixed-cpu"].as<bool>();
     conf.core = options["server-core"].as<unsigned>();
+    // TODO
+    ceph_assert_always(conf.is_fixed_cpu == false);
     return conf;
   }
 };
@@ -801,6 +806,7 @@ static seastar::future<> run(
   std::optional<unsigned> 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<unsigned>()->default_value(512),
      "client io depth")
+    ("server-fixed-cpu", bpo::value<bool>()->default_value(true),
+     "server is in the fixed cpu mode, non-fixed doesn't support the mode both")
     ("server-core", bpo::value<unsigned>()->default_value(1),
      "server running core")
     ("server-bs", bpo::value<unsigned>()->default_value(0),