From 776799082908515aad0296c73af0fb4b6f547290 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Wed, 20 Dec 2017 08:12:52 +0900 Subject: [PATCH] iscsi: Unexpected usage of RTE EAL Launch in load balancing Before removing the DPDK dependency from the iSCSI connection load balancing, this should be done. In spdk_iscsi_conn_allocate_reactor(cpumask) - if any lcore[i]'s state is FINISHED, the caller calls rte_eal_wait_lcore(i). But the purpose of rte_eal_wait_lcore() is to check if the slave is in a WAIT state before calling rte_eal_remote_launch(). The meaning of this usage is not clear. - If the state of lcore[i] is WAIT or FINISHED, the reactor does not run on the lcore[i]. iSCSI connections consist of not reactor but poller. Hence selecting lcore[i] with the state WAIT or FINISHED does not look correct. Change-Id: If8c420f2d16dc44e77f8963f5732faa52e3d829b Signed-off-by: Shuhei Matsumoto Reviewed-on: https://review.gerrithub.io/391332 Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker Tested-by: SPDK Automated Test System Reviewed-by: Ziye Yang --- lib/iscsi/conn.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index cd16e07c5..9e26f3cd9 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -1612,18 +1612,11 @@ spdk_iscsi_conn_allocate_reactor(uint64_t cpumask) } else { state = rte_eal_get_lcore_state(i); } - if (state == FINISHED) { - rte_eal_wait_lcore(i); - } switch (state) { case WAIT: case FINISHED: - /* Idle cores have 0 pollers. */ - if (0 < min_pollers) { - selected_core = i; - min_pollers = 0; - } + /* reactor does not run on the lcore */ break; case RUNNING: /* This lcore is running. Check how many pollers it already has. */