+0
−4
Loading
Purpose: Fix the unbalanced allocation of socket connection. Suppose we have 4 spdk threads, then there will be 4 sock groups, each on one spdk thread. And When using the NAPI_ID, each sock group will be responsible for one NAPI_ID. For example, Poll group: A, B, C, D, connection with NAPI_ID: 0, 1, 2, 3. However if connection with NAPI_ID 2 exits first, and we will allocate socket A (with the roundrobin manner, But not C again). So to avoid this, we choose lazy free. Since when the sock poling group is close, it will free them finally in spdk_sock_remove_sock_group_from_map_table. So there is no memeory leak, but eliminates unnecessary allocation/dellocation on spdk_sock_placement_id_entry. Signed-off-by:Ziye Yang <ziye.yang@intel.com> Change-Id: I9bbc9139c8f8f3999eab7cd9259db2d683bd8466 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1873 Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>