Re: [Linaro-mm-sig] [PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal

2023-08-18 Thread Rob Clark
On Fri, Aug 18, 2023 at 2:09 AM Christian König wrote: > > Am 17.08.23 um 23:37 schrieb Rob Clark: > > From: Rob Clark > > > > If a signal callback releases the sw_sync fence, that will trigger a > > deadlock as the timeline_fence_release recurses onto the fence->lock > > (used both for signaling

Re: [Linaro-mm-sig] [PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal

2023-08-18 Thread Christian König
Am 17.08.23 um 23:37 schrieb Rob Clark: From: Rob Clark If a signal callback releases the sw_sync fence, that will trigger a deadlock as the timeline_fence_release recurses onto the fence->lock (used both for signaling and the the timeline tree). To avoid that, temporarily hold an extra refere

[PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal

2023-08-17 Thread Rob Clark
From: Rob Clark If a signal callback releases the sw_sync fence, that will trigger a deadlock as the timeline_fence_release recurses onto the fence->lock (used both for signaling and the the timeline tree). To avoid that, temporarily hold an extra reference to the signalled fences until after we

Re: [PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal.

2020-07-14 Thread Chris Wilson
Quoting Chris Wilson (2020-07-14 19:30:39) > Quoting Bas Nieuwenhuizen (2020-07-14 19:17:21) > > On Tue, Jul 14, 2020 at 6:26 PM Chris Wilson > > wrote: > > > > > > Quoting Bas Nieuwenhuizen (2020-07-14 16:41:02) > > > > Calltree: > > > > timeline_fence_release > > > > drm_sched_entity_wakeup

Re: [PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal.

2020-07-14 Thread Chris Wilson
Quoting Bas Nieuwenhuizen (2020-07-14 19:17:21) > On Tue, Jul 14, 2020 at 6:26 PM Chris Wilson wrote: > > > > Quoting Bas Nieuwenhuizen (2020-07-14 16:41:02) > > > Calltree: > > > timeline_fence_release > > > drm_sched_entity_wakeup > > > dma_fence_signal_locked > > > sync_timeline_signal

Re: [PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal.

2020-07-14 Thread Bas Nieuwenhuizen
On Tue, Jul 14, 2020 at 6:26 PM Chris Wilson wrote: > > Quoting Bas Nieuwenhuizen (2020-07-14 16:41:02) > > Calltree: > > timeline_fence_release > > drm_sched_entity_wakeup > > dma_fence_signal_locked > > sync_timeline_signal > > sw_sync_ioctl > > > > Releasing the reference to the fence

Re: [PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal.

2020-07-14 Thread Chris Wilson
Quoting Bas Nieuwenhuizen (2020-07-14 16:41:02) > Calltree: > timeline_fence_release > drm_sched_entity_wakeup > dma_fence_signal_locked > sync_timeline_signal > sw_sync_ioctl > > Releasing the reference to the fence in the fence signal callback > seems reasonable to me, so this patch av

[PATCH] dma-buf/sw_sync: Avoid recursive lock during fence signal.

2020-07-14 Thread Bas Nieuwenhuizen
Calltree: timeline_fence_release drm_sched_entity_wakeup dma_fence_signal_locked sync_timeline_signal sw_sync_ioctl Releasing the reference to the fence in the fence signal callback seems reasonable to me, so this patch avoids the locking issue in sw_sync. d3862e44daa7 ("dma-buf/sw-sync