Hi Nirmoy,

> > > + struct intel_gt *gt;
> > > + unsigned int i;
> > > + int ret = 0;
> > > - cond_resched();
> > > + for_each_gt(gt, i915, i) {
> > > +         if (intel_gt_is_wedged(gt))
> > > +                 ret = -EIO;
> > I'm just wondering if it makes sense to check if the gt is
> > wedged.
> 
> Could you please expand more, what are your thoughts about this ?

if we are wedged, I do expect the wait_for_idle to fail and not
having any pending job.

But nevertheless it's not that important, it's just the way this
function is organized that makes me raise an eyebrow.

My r-b stands, still.

Andi

[...]

> > > +         cond_resched();
> > > -         GEM_TRACE("%pS timed out.\n",
> > > -                   __builtin_return_address(0));
> > > -         GEM_TRACE_DUMP();
> > > +         if (intel_gt_wait_for_idle(gt, HZ * 3) == -ETIME) {
> > > +                 pr_err("%pS timed out, cancelling all further 
> > > testing.\n",
> > > +                        __builtin_return_address(0));
> > > -         intel_gt_set_wedged(gt);
> > > -         ret = -EIO;
> > > +                 GEM_TRACE("%pS timed out.\n",
> > > +                           __builtin_return_address(0));
> > > +                 GEM_TRACE_DUMP();
> > > +
> > > +                 intel_gt_set_wedged(gt);
> > > +                 ret = -EIO;
> > > +         }
> > >           }
> > >           return ret;
> > > -- 
> > > 2.39.0

Reply via email to