@@ -87,6 +87,7 @@ struct client_config {
8787 unsigned num_clients;
8888 unsigned num_conns;
8989 unsigned depth;
90+ bool skip_core_0;
9091
9192 std::string str () const {
9293 std::ostringstream out;
@@ -97,6 +98,7 @@ struct client_config {
9798 << " , num_clients=" << num_clients
9899 << " , num_conns=" << num_conns
99100 << " , depth=" << depth
101+ << " , skip_core_0=" << skip_core_0
100102 << " )" ;
101103 return out.str ();
102104 }
@@ -116,6 +118,7 @@ struct client_config {
116118 conf.num_conns = options[" conns-per-client" ].as <unsigned >();
117119 ceph_assert_always (conf.num_conns > 0 );
118120 conf.depth = options[" depth" ].as <unsigned >();
121+ conf.skip_core_0 = options[" client-skip-core-0" ].as <bool >();
119122 return conf;
120123 }
121124};
@@ -589,7 +592,6 @@ static seastar::future<> run(
589592 msg_len{msg_len},
590593 nr_depth{_depth} {
591594 if (is_active ()) {
592- assert (sid > 0 );
593595 for (unsigned i = 0 ; i < num_conns; ++i) {
594596 conn_states.emplace_back (nr_depth);
595597 }
@@ -644,7 +646,6 @@ static seastar::future<> run(
644646 // should start messenger at this shard?
645647 bool is_active () {
646648 ceph_assert (seastar::this_shard_id () == sid);
647- ceph_assert (seastar::smp::count > num_clients);
648649 return sid + num_clients >= seastar::smp::count;
649650 }
650651
@@ -1107,7 +1108,11 @@ static seastar::future<> run(
11071108 if (mode == perf_mode_t ::both) {
11081109 logger ().info (" \n perf settings:\n smp={}\n {}\n {}\n " ,
11091110 seastar::smp::count, client_conf.str (), server_conf.str ());
1110- ceph_assert (seastar::smp::count > client_conf.num_clients );
1111+ if (client_conf.skip_core_0 ) {
1112+ ceph_assert (seastar::smp::count > client_conf.num_clients );
1113+ } else {
1114+ ceph_assert (seastar::smp::count >= client_conf.num_clients );
1115+ }
11111116 ceph_assert (client_conf.num_clients > 0 );
11121117 ceph_assert (seastar::smp::count > server_conf.core + client_conf.num_clients );
11131118 return seastar::when_all_succeed (
@@ -1128,7 +1133,11 @@ static seastar::future<> run(
11281133 } else if (mode == perf_mode_t ::client) {
11291134 logger ().info (" \n perf settings:\n smp={}\n {}\n " ,
11301135 seastar::smp::count, client_conf.str ());
1131- ceph_assert (seastar::smp::count > client_conf.num_clients );
1136+ if (client_conf.skip_core_0 ) {
1137+ ceph_assert (seastar::smp::count > client_conf.num_clients );
1138+ } else {
1139+ ceph_assert (seastar::smp::count >= client_conf.num_clients );
1140+ }
11321141 ceph_assert (client_conf.num_clients > 0 );
11331142 return client->init (
11341143 ).then ([client, addr = client_conf.server_addr ] {
@@ -1178,6 +1187,8 @@ int main(int argc, char** argv)
11781187 " client block size" )
11791188 (" depth" , bpo::value<unsigned >()->default_value (512 ),
11801189 " client io depth per job" )
1190+ (" client-skip-core-0" , bpo::value<bool >()->default_value (true ),
1191+ " client skip core 0" )
11811192 (" server-fixed-cpu" , bpo::value<bool >()->default_value (true ),
11821193 " server is in the fixed cpu mode, non-fixed doesn't support the mode both" )
11831194 (" server-core" , bpo::value<unsigned >()->default_value (1 ),
0 commit comments