Commit 77679908 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391332


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarZiye Yang <optimistyzy@gmail.com>
parent 739cd419
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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. */