Skip to contentSkip to conversation

drm/i915: Consistent ordering of tracepoint binary data

PATCH In review Tvrtko Ursulin 4 participants 6 messages May 11, 2017 – May 30, 2017

Subsystems (2)
lore
Share & tools
lore

Tvrtko Ursulin

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: Consistent ordering of tracepoint binary data

From: Tvrtko Ursulin <[email protected]>

For userspace receiving binary data it is easier if all related request tracepoints emit the binary data in the same order of dev, ring, ctx, seqno, ...

---
 drivers/gpu/drm/i915/i915_trace.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_trace.h +2 -2
index b24a83d43559..035c574cc33f 100644
@@ -678,8 +678,8 @@ DECLARE_EVENT_CLASS(i915_gem_request,
 
 	    TP_STRUCT__entry(
 			     __field(u32, dev)
-			     __field(u32, ctx)
 			     __field(u32, ring)
+			     __field(u32, ctx)
 			     __field(u32, seqno)
 			     __field(u32, global)
 			     ),
@@ -721,9 +721,9 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 		    TP_STRUCT__entry(
 				     __field(u32, dev)
 				     __field(u32, ring)
+				     __field(u32, ctx)
 				     __field(u32, seqno)
 				     __field(u32, global_seqno)
-				     __field(u32, ctx)
 				     __field(u32, port)
 				    ),
 
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 5 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

For userspace receiving binary data it is easier if all related request tracepoints emit the binary data in the same order of dev, ring, ctx, seqno, ...

We decided that dev, ctx, ring, seqno was the right heirachy last time. After much debate :)
ctx is the logical view of the device for a user
ctx + ring = timeline
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 11 lines · Chris Wilson
Quoted 5 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

For userspace receiving binary data it is easier if all related request tracepoints emit the binary data in the same order of dev, ring, ctx, seqno, ...

We decided that dev, ctx, ring, seqno was the right heirachy last time. After much debate :)
ctx is the logical view of the device for a user
ctx + ring = timeline

Hmm, we are also mixing ctx->hw_id and fence->context, right? (Not relevant, just thinking aloud.)
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
In reply to Chris Wilson
Quoted 11 lines · Chris Wilson
Quoted 5 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

For userspace receiving binary data it is easier if all related request tracepoints emit the binary data in the same order of dev, ring, ctx, seqno, ...

We decided that dev, ctx, ring, seqno was the right heirachy last time. After much debate :)
ctx is the logical view of the device for a user
ctx + ring = timeline

I couldn't remember so I thought it must have been what is documented in TP_printk. Now I am confused. On one hand it's true, but on the other ctx/seqno is also a pair as opposed to engine being stuck in the middle. So ring-ctx-seqno is easier for humans I think. Even since per ctx/engine seqno space.

Oh and I said I'll rename all those ring= to engine=..

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✓ Fi.CI.BAT: success for drm/i915: Consistent ordering of tracepoint binary data

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: drm/i915: Consistent ordering of tracepoint binary data
URL : https://patchwork.freedesktop.org/series/24293/
State : success

== Summary ==

Series 24293v1 drm/i915: Consistent ordering of tracepoint binary data
https://patchwork.freedesktop.org/api/1.0/series/24293/revisions/1/mbox/

Test gem_exec_flush:

        Subgroup basic-batch-kernel-default-uc:
                pass       -> FAIL       (fi-snb-2600) fdo#100007

fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:445s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:437s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:581s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:518s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time:565s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:495s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:484s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:414s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:411s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:421s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:495s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:484s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:461s
fi-kbl-7560u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:579s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:461s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time:577s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:471s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:496s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:439s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:542s
fi-snb-2600      total:278  pass:248  dwarn:0   dfail:0   fail:1   skip:29  time:420s

81dbd44ab4c1331c61a971b05681473a869b3039 drm-tip: 2017y-05m-11d-09h-55m-44s UTC integration manifest 9fd2f9d drm/i915: Consistent ordering of tracepoint binary data

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4674/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Tvrtko Ursulin
Quoted 9 lines · Tvrtko Ursulin
Quoted 7 lines · Chris Wilson
Quoted 5 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

For userspace receiving binary data it is easier if all related request tracepoints emit the binary data in the same order of dev, ring, ctx, seqno, ...

Quoted 6 lines
Quoted 4 lines

We decided that dev, ctx, ring, seqno was the right heirachy last time. After much debate :)
ctx is the logical view of the device for a user
ctx + ring = timeline

I couldn't remember so I thought it must have been what is documented in TP_printk. Now I am confused. On one hand it's true, but on the other ctx/seqno is also a pair as opposed to engine being stuck in the middle. So ring-ctx-seqno is easier for humans I think. Even since per ctx/engine seqno space.

[thread bump!]

Can we agree what to do here? Printk's are all engine-ctx-seqno which makes it sound like that was the order we agreed upon. But binary blobs are inconsistent as you have noticed - do we care enough to go and fiddle with that is the question? Is overlay the only userspace to your knowledge that accesses the binary blobs?

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx