gpu: nvgpu: Capture thread name for every channel created

This change ensures that in scenarios where GPU enters a bad
state because of the work submitted by a misbehaved thread,
we should be able to capture thread name as part of our
1st set of failure logs.
Changes for QNX env is pending.

JIRA NVGPU-7783

Change-Id: I65d55a6ade749ff91739458e0642ed2dafaae5cc
Signed-off-by: Kishan <kpalankar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2879197
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Tejal Kudav <tkudav@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Kishan
2023-03-29 11:07:51 +00:00
committed by mobile promotions
parent af48120169
commit c6d5fb348c
8 changed files with 52 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2022, NVIDIA Corporation. All rights reserved.
* Copyright (c) 2017-2023, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -150,12 +150,12 @@ void nvgpu_set_err_notifier_locked(struct nvgpu_channel *ch, u32 error)
if (error == NVGPU_CHANNEL_RESETCHANNEL_VERIF_ERROR) {
nvgpu_log_info(ch->g,
"error notifier set to %d for ch %d",
error, ch->chid);
"error notifier set to %d for ch %d owned by %s",
error, ch->chid, ch->thread_name);
} else {
nvgpu_err(ch->g,
"error notifier set to %d for ch %d",
error, ch->chid);
"error notifier set to %d for ch %d owned by %s",
error, ch->chid, ch->thread_name);
}
}
}