bdevperf: call spdk_thread_exit on job threads
Note: we can only exit a job thread after all jobs are done executing. This is because some bdevs like Ceph send messages to a main thread, so we need to make sure a main thread doesn't exit before another thread that is sending messages to it. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iaa51f13f3bc659f6eda7fcefff82c127e095ce29 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15516 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
85d70c03c5
commit
081b190b5f
@ -370,6 +370,12 @@ bdevperf_job_free(struct bdevperf_job *job)
|
||||
free(job);
|
||||
}
|
||||
|
||||
static void
|
||||
job_thread_exit(void *ctx)
|
||||
{
|
||||
spdk_thread_exit(spdk_get_thread());
|
||||
}
|
||||
|
||||
static void
|
||||
bdevperf_test_done(void *ctx)
|
||||
{
|
||||
@ -407,6 +413,8 @@ bdevperf_test_done(void *ctx)
|
||||
|
||||
performance_dump_job(&g_stats, job);
|
||||
|
||||
spdk_thread_send_msg(job->thread, job_thread_exit, NULL);
|
||||
|
||||
TAILQ_FOREACH_SAFE(task, &job->task_list, link, ttmp) {
|
||||
TAILQ_REMOVE(&job->task_list, task, link);
|
||||
spdk_free(task->buf);
|
||||
|
Loading…
Reference in New Issue
Block a user