Revert "env/dpdk: Exclude the orig cpuset in spdk_unaffinitize_thread"
This reverts commit d9561c444f
.
This patch is incorrectly iterating the CPU mask assuming it is
contiguous. However, rather than fix it, let's just let the kernel
scheduler place the thread where it thinks is best. It's going to prefer
idle cores anyway. So reverting is the simplest way forward.
Change-Id: I7b66cce7bfb6ddb108aa7576f508aa3b02b79138
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10475
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
ac1abb5be8
commit
d1522dd5bc
@ -353,8 +353,8 @@ void spdk_pause(void)
|
||||
void
|
||||
spdk_unaffinitize_thread(void)
|
||||
{
|
||||
rte_cpuset_t new_cpuset, orig_cpuset;
|
||||
long num_cores, i, orig_num_cores;
|
||||
rte_cpuset_t new_cpuset;
|
||||
long num_cores, i;
|
||||
|
||||
CPU_ZERO(&new_cpuset);
|
||||
|
||||
@ -365,16 +365,6 @@ spdk_unaffinitize_thread(void)
|
||||
CPU_SET(i, &new_cpuset);
|
||||
}
|
||||
|
||||
rte_thread_get_affinity(&orig_cpuset);
|
||||
orig_num_cores = CPU_COUNT(&orig_cpuset);
|
||||
if (orig_num_cores < num_cores) {
|
||||
for (i = 0; i < orig_num_cores; i++) {
|
||||
if (CPU_ISSET(i, &orig_cpuset)) {
|
||||
CPU_CLR(i, &new_cpuset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rte_thread_set_affinity(&new_cpuset);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user