Commit 44970291 authored by Jim Harris's avatar Jim Harris Committed by Ben Walker
Browse files

fio/nvme, fio/bdev: use specific NUMA ID when possible



Currently if any namespace or bdev reports NUMA_ID_ANY, we allocate
the buffer using NUMA_ID_ANY. This basically keeps original behavior,
unless all namespaces and bdevs reports a NUMA ID.

But it is OK to just use a specific NUMA ID as long as none of the
other namespaces or bdevs in that job have a conflicting NUMA ID. If
the other namespaces or bdevs report NUMA_ID_ANY we can just ignore
them.

Suggested-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I18743a5e26d1098804b7783c592b89bfe9286423
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24815


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent c60db57a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -845,8 +845,8 @@ spdk_fio_iomem_alloc(struct thread_data *td, size_t total_mem)
		tmp_numa_id = spdk_bdev_get_numa_id(fio_target->bdev);
		if (numa_id == SPDK_ENV_NUMA_ID_ANY) {
			numa_id = tmp_numa_id;
		} else if (tmp_numa_id != numa_id ||
			   tmp_numa_id == SPDK_ENV_NUMA_ID_ANY) {
		} else if (tmp_numa_id != numa_id &&
			   tmp_numa_id != SPDK_ENV_NUMA_ID_ANY) {
			numa_id = SPDK_ENV_NUMA_ID_ANY;
			break;
		}
+2 −2
Original line number Diff line number Diff line
@@ -801,8 +801,8 @@ spdk_fio_iomem_alloc(struct thread_data *td, size_t total_mem)
		tmp_numa_id = spdk_nvme_ctrlr_get_numa_id(ctrlr);
		if (numa_id == SPDK_ENV_NUMA_ID_ANY) {
			numa_id = tmp_numa_id;
		} else if (tmp_numa_id != numa_id ||
			   tmp_numa_id == SPDK_ENV_NUMA_ID_ANY) {
		} else if (tmp_numa_id != numa_id &&
			   tmp_numa_id != SPDK_ENV_NUMA_ID_ANY) {
			numa_id = SPDK_ENV_NUMA_ID_ANY;
			break;
		}