Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-12-06 Thread Daniele Ceraolo Spurio
On 11/30/2023 4:10 PM, Teres Alexis, Alan Previn wrote: As far as i can tell, its only if we started resetting / wedging right after this queued worker got started. alan: hope Daniele can proof read my tracing and confirm if got it right. Yup, we don't flush the worker in reset prepare,

Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-30 Thread Teres Alexis, Alan Previn
> As far as i can tell, its only if we started resetting / wedging right after > this > queued worker got started. alan: hope Daniele can proof read my tracing and confirm if got it right.

Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-30 Thread Teres Alexis, Alan Previn
On Thu, 2023-11-30 at 16:18 -0500, Vivi, Rodrigo wrote: > On Wed, Nov 29, 2023 at 04:20:13PM -0800, Alan Previn wrote: alan:snip > > + > > if (unlikely(disabled)) { > > release_guc_id(guc, ce); > > __guc_context_destroy(ce); > > - return; > > +

Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-30 Thread Rodrigo Vivi
On Wed, Nov 29, 2023 at 04:20:13PM -0800, Alan Previn wrote: > If we are at the end of suspend or very early in resume > its possible an async fence signal (via rcu_call) is triggered > to free_engines which could lead us to the execution of > the context destruction worker (after a prior worker

[PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-29 Thread Alan Previn
If we are at the end of suspend or very early in resume its possible an async fence signal (via rcu_call) is triggered to free_engines which could lead us to the execution of the context destruction worker (after a prior worker flush). Thus, when suspending, insert rcu_barriers at the start of