diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-09-28 07:27:41 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-12 05:30:48 -0400 |
commit | 036e4ea2442d27cdbce6d67683ea629ed82ed208 (patch) | |
tree | fe18493e3c7304da9a8368ea4c764f99dd170ec7 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | 114cfcca58b2e5ef78fc604fcf574d6d2c1e5d0b (diff) |
gpu: nvgpu: make channel worker wait interruptible
Change the wait for work pending condition to interruptible in the
channel worker thread, as there's no reason to be noninterruptible.
A noninterruptible wait, even one with a timeout, causes the worker to
be printed in the Linux blocked tasks list which is confusing.
Change the cond signal to interruptible to match this.
Change-Id: I71d848b7f449a5d53fecae90c6a450c98c675c7f
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1570166
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 6ed35c32..e3937afd 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1773,7 +1773,7 @@ static int __gk20a_channel_worker_wakeup(struct gk20a *g) | |||
1773 | */ | 1773 | */ |
1774 | 1774 | ||
1775 | put = nvgpu_atomic_inc_return(&g->channel_worker.put); | 1775 | put = nvgpu_atomic_inc_return(&g->channel_worker.put); |
1776 | nvgpu_cond_signal(&g->channel_worker.wq); | 1776 | nvgpu_cond_signal_interruptible(&g->channel_worker.wq); |
1777 | 1777 | ||
1778 | return put; | 1778 | return put; |
1779 | } | 1779 | } |
@@ -1867,7 +1867,7 @@ static int gk20a_channel_poll_worker(void *arg) | |||
1867 | while (!nvgpu_thread_should_stop(&worker->poll_task)) { | 1867 | while (!nvgpu_thread_should_stop(&worker->poll_task)) { |
1868 | int ret; | 1868 | int ret; |
1869 | 1869 | ||
1870 | ret = NVGPU_COND_WAIT( | 1870 | ret = NVGPU_COND_WAIT_INTERRUPTIBLE( |
1871 | &worker->wq, | 1871 | &worker->wq, |
1872 | __gk20a_channel_worker_pending(g, get), | 1872 | __gk20a_channel_worker_pending(g, get), |
1873 | watchdog_interval) > 0; | 1873 | watchdog_interval) > 0; |