All of lore.kernel.org
 help / color / mirror / Atom feed
* Reasonable maximum signaling timeout for dma_fences
@ 2025-11-20 14:41 Christian König
  2025-11-20 14:41 ` [PATCH 1/4] dma-buf/fence: give some reasonable maximum signaling timeout Christian König
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Christian König @ 2025-11-20 14:41 UTC (permalink / raw)
  To: phasta, alexdeucher, simona.vetter, faith, sumit.semwal
  Cc: linaro-mm-sig, dri-devel

Hi everybody,

we have documented here https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html#dma-fence-cross-driver-contract that dma_fence objects must signal in a reasonable amount of time, but at the same time note that drivers might have a different idea of what reasonable means.

Recently I realized that this is actually not a good idea. Background is that the wall clock timeout means that for example the OOM killer might actually wait for this timeout to be able to terminate a process and reclaim the memory used. And this is just an example of how general kernel features might depend on that.

Some drivers and fence implementations used 10 seconds and that raised complains by end users. So at least amdgpu recently switched to 2 second which triggered an internal discussion about it.

This patch set here now adds a define to the dma_fence header which gives 2 seconds as reasonable amount of time. SW-sync is modified to always taint the kernel (since it doesn't has a timeout), VGEM is switched over to the new define and the scheduler gets a warning and taints the kernel if a driver uses a timeout longer than that.

I have not much intention of actually committing the patches (maybe except the SW-sync one), but question is if 2 seconds are reasonable?

Regards,
Christian.


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-12-05 13:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 14:41 Reasonable maximum signaling timeout for dma_fences Christian König
2025-11-20 14:41 ` [PATCH 1/4] dma-buf/fence: give some reasonable maximum signaling timeout Christian König
2025-11-25  7:55   ` Philipp Stanner
2025-11-25  8:03     ` Christian König
2025-11-25  8:13       ` Philipp Stanner
2025-11-25  8:48         ` Christian König
2025-11-25 10:56           ` Philipp Stanner
2025-11-25 14:26             ` Christian König
2025-11-25 16:03               ` Philipp Stanner
2025-11-25 17:02               ` Lucas Stach
2025-11-26 12:31                 ` Christian König
2025-11-26 12:37                   ` Philipp Stanner
2025-11-26 15:03                     ` Christian König
2025-11-26 15:44                       ` Philipp Stanner
2025-11-26 15:59                         ` Lucas Stach
2025-11-26 16:11                         ` Lucas Stach
2025-12-05 13:14                           ` Christian König
2025-11-20 14:41 ` [PATCH 2/4] dma-buf/sw-sync: always taint the kernel when sw-sync is used Christian König
2025-11-25  2:58   ` Sumit Semwal
2025-11-20 14:41 ` [PATCH 3/4] drm/vgem: use the reasonable maximum timeout defined by the dma_fence Christian König
2025-11-25  7:56   ` Philipp Stanner
2025-11-20 14:41 ` [PATCH 4/4] drm/sched: warn and taint the kernel when maximum timeout is exceeded Christian König
2025-11-25  8:08   ` Philipp Stanner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.