example/perf: comment the ns to worker association

This documents the logic below and motivation behind
(70db0e1)nvme/perf: Add support for multiple cores per device.

Change-Id: I949b794355f871c0f995b946622dbe77295d922b
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14413
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
Tomasz Zawadzki 2022-09-07 17:29:55 +02:00
parent 762db2a4f4
commit b6e9e1abb4

View File

@ -2837,6 +2837,11 @@ associate_workers_with_ns(void)
struct ns_worker_ctx *ns_ctx; struct ns_worker_ctx *ns_ctx;
int i, count; int i, count;
/* Each core contains single worker, and namespaces are associated as follows:
* 1) equal workers and namespaces - each worker associated with single namespace
* 2) more workers than namespaces - each namespace is associated with one or more workers
* 3) more namespaces than workers - each worker is associated with one or more namespaces
*/
count = g_num_namespaces > g_num_workers ? g_num_namespaces : g_num_workers; count = g_num_namespaces > g_num_workers ? g_num_namespaces : g_num_workers;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {