* [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly
@ 2015-04-01 9:36 Chris Wilson
2015-04-01 15:04 ` Mika Kuoppala
2015-04-02 10:07 ` shuang.he
0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2015-04-01 9:36 UTC (permalink / raw)
To: intel-gfx
Count the number of requests in a ring for the user and show who
submitted them.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 39 ++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 9edc3f692256..6ff12ca147aa 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -671,31 +671,44 @@ static int i915_gem_request_info(struct seq_file *m, void *data)
struct drm_device *dev = node->minor->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_engine_cs *ring;
- struct drm_i915_gem_request *gem_request;
- int ret, count, i;
+ struct drm_i915_gem_request *rq;
+ int ret, any, i;
ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret)
return ret;
- count = 0;
+ any = 0;
for_each_ring(ring, dev_priv, i) {
- if (list_empty(&ring->request_list))
+ int count;
+
+ count = 0;
+ list_for_each_entry(rq, &ring->request_list, list)
+ count++;
+ if (count == 0)
continue;
- seq_printf(m, "%s requests:\n", ring->name);
- list_for_each_entry(gem_request,
- &ring->request_list,
- list) {
- seq_printf(m, " %x @ %d\n",
- gem_request->seqno,
- (int) (jiffies - gem_request->emitted_jiffies));
+ seq_printf(m, "%s requests: %d\n", ring->name, count);
+ list_for_each_entry(rq, &ring->request_list, list) {
+ struct task_struct *task;
+
+ rcu_read_lock();
+ task = NULL;
+ if (rq->pid)
+ task = pid_task(rq->pid, PIDTYPE_PID);
+ seq_printf(m, " %x @ %d: %s [%d]\n",
+ rq->seqno,
+ (int) (jiffies - rq->emitted_jiffies),
+ task ? task->comm : "<unknown>",
+ task ? task->pid : -1);
+ rcu_read_unlock();
}
- count++;
+
+ any++;
}
mutex_unlock(&dev->struct_mutex);
- if (count == 0)
+ if (any == 0)
seq_puts(m, "No requests\n");
return 0;
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly
2015-04-01 9:36 [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly Chris Wilson
@ 2015-04-01 15:04 ` Mika Kuoppala
2015-04-01 15:32 ` Daniel Vetter
2015-04-02 10:07 ` shuang.he
1 sibling, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2015-04-01 15:04 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Count the number of requests in a ring for the user and show who
> submitted them.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 39 ++++++++++++++++++++++++-------------
> 1 file changed, 26 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 9edc3f692256..6ff12ca147aa 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -671,31 +671,44 @@ static int i915_gem_request_info(struct seq_file *m, void *data)
> struct drm_device *dev = node->minor->dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct intel_engine_cs *ring;
> - struct drm_i915_gem_request *gem_request;
> - int ret, count, i;
> + struct drm_i915_gem_request *rq;
> + int ret, any, i;
>
> ret = mutex_lock_interruptible(&dev->struct_mutex);
> if (ret)
> return ret;
>
> - count = 0;
> + any = 0;
> for_each_ring(ring, dev_priv, i) {
> - if (list_empty(&ring->request_list))
> + int count;
> +
> + count = 0;
> + list_for_each_entry(rq, &ring->request_list, list)
> + count++;
> + if (count == 0)
> continue;
>
> - seq_printf(m, "%s requests:\n", ring->name);
> - list_for_each_entry(gem_request,
> - &ring->request_list,
> - list) {
> - seq_printf(m, " %x @ %d\n",
> - gem_request->seqno,
> - (int) (jiffies - gem_request->emitted_jiffies));
> + seq_printf(m, "%s requests: %d\n", ring->name, count);
> + list_for_each_entry(rq, &ring->request_list, list) {
> + struct task_struct *task;
> +
> + rcu_read_lock();
> + task = NULL;
> + if (rq->pid)
> + task = pid_task(rq->pid, PIDTYPE_PID);
> + seq_printf(m, " %x @ %d: %s [%d]\n",
> + rq->seqno,
> + (int) (jiffies - rq->emitted_jiffies),
> + task ? task->comm : "<unknown>",
> + task ? task->pid : -1);
> + rcu_read_unlock();
> }
> - count++;
> +
> + any++;
> }
> mutex_unlock(&dev->struct_mutex);
>
> - if (count == 0)
> + if (any == 0)
> seq_puts(m, "No requests\n");
>
> return 0;
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly
2015-04-01 15:04 ` Mika Kuoppala
@ 2015-04-01 15:32 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2015-04-01 15:32 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
On Wed, Apr 01, 2015 at 06:04:01PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
>
> > Count the number of requests in a ring for the user and show who
> > submitted them.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly
2015-04-01 9:36 [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly Chris Wilson
2015-04-01 15:04 ` Mika Kuoppala
@ 2015-04-02 10:07 ` shuang.he
1 sibling, 0 replies; 4+ messages in thread
From: shuang.he @ 2015-04-02 10:07 UTC (permalink / raw)
To: shuang.he, ethan.gao, intel-gfx, chris
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6112
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -4 272/272 268/272
ILK 302/302 302/302
SNB 303/303 303/303
IVB 338/338 338/338
BYT -1 287/287 286/287
HSW -1 361/361 360/361
BDW 308/308 308/308
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*PNV igt@gem_fence_thrash@bo-write-verify-threaded-none PASS(4) FAIL(1)PASS(1)
PNV igt@gem_tiled_pread_pwrite FAIL(3)PASS(6) FAIL(1)PASS(1)
PNV igt@gem_userptr_blits@coherency-sync CRASH(4)PASS(5) CRASH(1)PASS(1)
PNV igt@gen3_render_tiledx_blits FAIL(5)PASS(3) FAIL(2)
*BYT igt@gem_exec_bad_domains@conflicting-write-domain PASS(7) FAIL(1)PASS(1)
*HSW igt@gem_storedw_loop_vebox PASS(2) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:i915_hangcheck_elapsed[i915]]*ERROR*Hangcheck_timer_elapsed...video_enhancement_ring_idle@Hangcheck timer elapsed... video enhancement ring idle
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-02 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01 9:36 [PATCH] drm/i915: Make debugfs/i915_gem_request more friendly Chris Wilson
2015-04-01 15:04 ` Mika Kuoppala
2015-04-01 15:32 ` Daniel Vetter
2015-04-02 10:07 ` shuang.he
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.