On Wed, Jun 27, 2012 at 12:08:33AM +0200, Łukasz Kuryło wrote:
> >
> > - if (!mutex_trylock(&dev->struct_mutex))
> > - return -EBUSY;
> > + mutex_lock(&dev->struct_mutex);
> >
> > i915_gem_reset(dev);
> >
>
> But ... the original code:
>
> Correct me if I'm wrong.
>
> - if (!mutex_trylock(&dev->struct_mutex))
> - return -EBUSY;
> + mutex_lock(&dev->struct_mutex);
>
> i915_gem_reset(dev);
>
But ... the original code:
Correct me if I'm wrong.
In every manual I've found mutex_trylock(...) returns 0 on success.
So
if(!mutex_tr
Simply failing to reset the gpu because someone else might still hold
the mutex isn't a great idea - I see reliable silent reset failures.
And gpu reset simply needs to be reliable and Just Work.
"But ... the deadlocks!"
We already kick all processes waiting for the gpu before launching the
reset