Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Christian König
Am 19.05.21 um 13:51 schrieb Andrey Grodzovsky: On 2021-05-19 7:46 a.m., Christian König wrote: Am 19.05.21 um 13:03 schrieb Andrey Grodzovsky: On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ?

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Andrey Grodzovsky
On 2021-05-19 7:46 a.m., Christian König wrote: Am 19.05.21 um 13:03 schrieb Andrey Grodzovsky: On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Christian König
Am 19.05.21 um 13:03 schrieb Andrey Grodzovsky: On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we can wait blocking here or not. We install a callb

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Andrey Grodzovsky
On 2021-05-19 6:57 a.m., Christian König wrote: Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we can wait blocking here or not. We install a callback a bit lower to avoid blocking, so I'm pretty

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-19 Thread Christian König
Am 18.05.21 um 20:48 schrieb Andrey Grodzovsky: [SNIP] Would this be the right way to do it ? Yes, it is at least a start. Question is if we can wait blocking here or not. We install a callback a bit lower to avoid blocking, so I'm pretty sure that won't work as expected. Christian. I

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Andrey Grodzovsky
On 2021-05-18 2:48 p.m., Andrey Grodzovsky wrote: On 2021-05-18 2:13 p.m., Christian König wrote: Am 18.05.21 um 20:09 schrieb Andrey Grodzovsky: On 2021-05-18 2:02 p.m., Christian König wrote: Am 18.05.21 um 19:43 schrieb Andrey Grodzovsky: On 2021-05-18 12:33 p.m., Christian König wro

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Andrey Grodzovsky
On 2021-05-18 2:13 p.m., Christian König wrote: Am 18.05.21 um 20:09 schrieb Andrey Grodzovsky: On 2021-05-18 2:02 p.m., Christian König wrote: Am 18.05.21 um 19:43 schrieb Andrey Grodzovsky: On 2021-05-18 12:33 p.m., Christian König wrote: Am 18.05.21 um 18:17 schrieb Andrey Grodzovsky:

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
Am 18.05.21 um 20:09 schrieb Andrey Grodzovsky: On 2021-05-18 2:02 p.m., Christian König wrote: Am 18.05.21 um 19:43 schrieb Andrey Grodzovsky: On 2021-05-18 12:33 p.m., Christian König wrote: Am 18.05.21 um 18:17 schrieb Andrey Grodzovsky: On 2021-05-18 11:15 a.m., Christian König wrote:

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Andrey Grodzovsky
On 2021-05-18 2:02 p.m., Christian König wrote: Am 18.05.21 um 19:43 schrieb Andrey Grodzovsky: On 2021-05-18 12:33 p.m., Christian König wrote: Am 18.05.21 um 18:17 schrieb Andrey Grodzovsky: On 2021-05-18 11:15 a.m., Christian König wrote: Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
Am 18.05.21 um 19:43 schrieb Andrey Grodzovsky: On 2021-05-18 12:33 p.m., Christian König wrote: Am 18.05.21 um 18:17 schrieb Andrey Grodzovsky: On 2021-05-18 11:15 a.m., Christian König wrote: Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky: On 2021-05-18 10:07 a.m., Christian König wrote:

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Andrey Grodzovsky
On 2021-05-18 12:33 p.m., Christian König wrote: Am 18.05.21 um 18:17 schrieb Andrey Grodzovsky: On 2021-05-18 11:15 a.m., Christian König wrote: Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky: On 2021-05-18 10:07 a.m., Christian König wrote: In a separate discussion with Daniel we once

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
Am 18.05.21 um 18:17 schrieb Andrey Grodzovsky: On 2021-05-18 11:15 a.m., Christian König wrote: Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky: On 2021-05-18 10:07 a.m., Christian König wrote: In a separate discussion with Daniel we once more iterated over the dma_resv requirements and I c

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Andrey Grodzovsky
On 2021-05-18 11:15 a.m., Christian König wrote: Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky: On 2021-05-18 10:07 a.m., Christian König wrote: In a separate discussion with Daniel we once more iterated over the dma_resv requirements and I came to the conclusion that this approach here w

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
Am 18.05.21 um 17:03 schrieb Andrey Grodzovsky: On 2021-05-18 10:07 a.m., Christian König wrote: In a separate discussion with Daniel we once more iterated over the dma_resv requirements and I came to the conclusion that this approach here won't work reliable. The problem is as following: 1.

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Andrey Grodzovsky
On 2021-05-18 10:07 a.m., Christian König wrote: In a separate discussion with Daniel we once more iterated over the dma_resv requirements and I came to the conclusion that this approach here won't work reliable. The problem is as following: 1. device A schedules some rendering with into a b

Re: [PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-18 Thread Christian König
In a separate discussion with Daniel we once more iterated over the dma_resv requirements and I came to the conclusion that this approach here won't work reliable. The problem is as following: 1. device A schedules some rendering with into a buffer and exports it as DMA-buf. 2. device B import

[PATCH v7 13/16] drm/scheduler: Fix hang when sched_entity released

2021-05-12 Thread Andrey Grodzovsky
Problem: If scheduler is already stopped by the time sched_entity is released and entity's job_queue not empty I encountred a hang in drm_sched_entity_flush. This is because drm_sched_entity_is_idle never becomes false. Fix: In drm_sched_fini detach all sched_entities from the scheduler's run queu