Re: [PATCH] drm/i915: Show waiter's status on engine dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2018-11-21 15:08:27)
> 
> On 21/11/2018 13:09, Chris Wilson wrote:
> > When showing the list of waiters, include the task's status so that we
> > can tell if they have been woken up and are waiting for the CPU, or if
> > they are still waiting to be woken.
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> > ---
> >   drivers/gpu/drm/i915/intel_engine_cs.c | 6 ++++--
> >   1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> > index 885a901b6e13..f6554d5eb1cf 100644
> > --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> > +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> > @@ -1562,8 +1562,10 @@ void intel_engine_dump(struct intel_engine_cs *engine,
> >       for (rb = rb_first(&b->waiters); rb; rb = rb_next(rb)) {
> >               struct intel_wait *w = rb_entry(rb, typeof(*w), node);
> >   
> > -             drm_printf(m, "\t%s [%d] waiting for %x\n",
> > -                        w->tsk->comm, w->tsk->pid, w->seqno);
> > +             drm_printf(m, "\t%s [%d] (state:%lx, %s) waiting for %x\n",
> > +                        w->tsk->comm, w->tsk->pid, w->tsk->state,
> > +                        w->tsk->state & TASK_NORMAL ? "asleep" : "runnable",
> > +                        w->seqno);
> >       }
> >       spin_unlock(&b->rb_lock);
> >       local_irq_restore(flags);
> > 
> 
> I don't like this low level fishing much. Would task_state_to_char 
> helper be sufficient here?

Hah, you just snuck that in right?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux