diff --git a/lib/event/reactor.c b/lib/event/reactor.c index 3396b7db1d..724371c6a8 100644 --- a/lib/event/reactor.c +++ b/lib/event/reactor.c @@ -1010,8 +1010,10 @@ void spdk_reactors_start(void) { struct spdk_reactor *reactor; + struct spdk_cpuset tmp_cpumask = {}; uint32_t i, current_core; int rc; + char thread_name[32]; g_rusage_period = (CONTEXT_SWITCH_MONITOR_PERIOD * spdk_get_ticks_hz()) / SPDK_SEC_TO_USEC; g_reactor_state = SPDK_REACTOR_STATE_RUNNING; @@ -1030,6 +1032,14 @@ spdk_reactors_start(void) assert(false); return; } + + /* For now, for each reactor spawn one thread. */ + snprintf(thread_name, sizeof(thread_name), "reactor_%u", reactor->lcore); + + spdk_cpuset_zero(&tmp_cpumask); + spdk_cpuset_set_cpu(&tmp_cpumask, i, true); + + spdk_thread_create(thread_name, &tmp_cpumask); } spdk_cpuset_set_cpu(&g_reactor_core_mask, i, true); } diff --git a/test/spdkcli/match_files/spdkcli_details_vhost_ctrl.test.match b/test/spdkcli/match_files/spdkcli_details_vhost_ctrl.test.match index b545dd7cb4..7e045fb7d0 100644 --- a/test/spdkcli/match_files/spdkcli_details_vhost_ctrl.test.match +++ b/test/spdkcli/match_files/spdkcli_details_vhost_ctrl.test.match @@ -14,7 +14,7 @@ } ] }, - "cpumask": "$(S)", + "cpumask": "0x3", "ctrlr": "vhost_scsi1", "delay_base_us": 20, "iops_threshold": 1000000,