iscsi: Always schedule discovery sessions on the acceptor thread
Change-Id: I0b8aee43f8b4cc380c91a7bb69fb33b307edb412 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453019 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
fc35f1ae3e
commit
c6f43b89bc
@ -1430,6 +1430,12 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
|
|||||||
|
|
||||||
lcore = SPDK_ENV_LCORE_ID_ANY;
|
lcore = SPDK_ENV_LCORE_ID_ANY;
|
||||||
|
|
||||||
|
if (conn->sess->session_type != SESSION_TYPE_NORMAL) {
|
||||||
|
/* Leave all non-normal sessions on the acceptor
|
||||||
|
* thread. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < spdk_env_get_core_count(); i++) {
|
for (i = 0; i < spdk_env_get_core_count(); i++) {
|
||||||
if (g_next_core > spdk_env_get_last_core()) {
|
if (g_next_core > spdk_env_get_last_core()) {
|
||||||
g_next_core = spdk_env_get_first_core();
|
g_next_core = spdk_env_get_first_core();
|
||||||
@ -1450,7 +1456,6 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
|
|||||||
lcore = spdk_env_get_first_core();
|
lcore = spdk_env_get_first_core();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->sess->session_type == SESSION_TYPE_NORMAL) {
|
|
||||||
target = conn->sess->target;
|
target = conn->sess->target;
|
||||||
pthread_mutex_lock(&target->mutex);
|
pthread_mutex_lock(&target->mutex);
|
||||||
target->num_active_conns++;
|
target->num_active_conns++;
|
||||||
@ -1471,7 +1476,6 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
|
|||||||
lcore = target->lcore;
|
lcore = target->lcore;
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&target->mutex);
|
pthread_mutex_unlock(&target->mutex);
|
||||||
}
|
|
||||||
|
|
||||||
iscsi_poll_group_remove_conn(conn);
|
iscsi_poll_group_remove_conn(conn);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user