Commit 0bfa2536 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

bdevperf: free job configs at the end of test run



It makes it to possible to use different bdevs on subsequent
"perform_tests" runs, as the bdev will now be selected just before
running the tests and not at the start of the application.

This can be useful, when the first set of tests are supposed to be run
on one bdev, but then switch to another one without having to restart
the application.  E.g.:

$ build/examples/bdevperf -z -t 8 -w randread -q 128 -o 4096 &
$ scripts/rpc.py bdev_null_create null0 100 4096
$ examples/bdev/bdevperf/bdevperf.py perform_tests

Running I/O for 8 seconds...

                                                                                                Latency(us)
 Device Information          : runtime(s)       IOPS      MiB/s     Fail/s     TO/s    Average        min        max
 Job: null0 (Core Mask 0x1)
         null0               :       8.00  410608.08    1603.94       0.00     0.00     310.09     117.19    2066.20
 ===================================================================================================================
 Total                       :             410608.08    1603.94       0.00     0.00     310.09     117.19    2066.20

$ scripts/rpc.py bdev_passthru_create -b null0 -p passthru0
$ examples/bdev/bdevperf/bdevperf.py perform_tests

Running I/O for 8 seconds...

                                                                                                Latency(us)
 Device Information          : runtime(s)       IOPS      MiB/s     Fail/s     TO/s    Average        min        max
 Job: passthru0 (Core Mask 0x1)
         passthru0           :       8.00  186112.27     727.00       0.00     0.00     685.95     208.21    2876.30
 ===================================================================================================================
 Total                       :             186112.27     727.00       0.00     0.00     685.95       0.00    2876.30

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I720d476eed135c0c12dacd2455c0e08fb6c51ecd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20419


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 2b9cef59
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -628,6 +628,10 @@ clean:
		}
	}

	if (g_bdevperf_conf == NULL) {
		free_job_config();
	}

	rc = g_run_rc;
	if (g_request && !g_shutdown) {
		rpc_perform_tests_cb();