From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 0/5] Per-client engine stats
Date: Thu, 15 Feb 2018 10:50:33 +0000 [thread overview]
Message-ID: <e45d268e-5154-bded-ef58-ae94d46fd1a4@linux.intel.com> (raw)
In-Reply-To: <151868807317.15373.1618745213566702117@mail.alporthouse.com>
On 15/02/2018 09:47, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-02-15 09:44:58)
>>
>> On 14/02/2018 19:20, Chris Wilson wrote:
>>> Quoting Tvrtko Ursulin (2018-02-14 18:50:30)
>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>
>>>> Another re-post of my earlier, now slightly updated work, to expose a DRM client
>>>> hierarchy in sysfs in order to enable a top like tool:
>>>
>>> So what I don't like about it is that it is a new interface in sysfs. We
>>> already have a PMU interface for statistics and would rather see that
>>> extended than abandoned. If perf can handle new processes coming and
>>> going, surely we can handle new clients? :|
>>
>> I don't think it means abandoning the PMU, just that I don't see it
>> suitable for this use case.
>>
>> Even if we go with adding a PMU task mode, that is a separate thing from
>> this. It would allow profiling of a single task, but not enumerating and
>> profiling all clients/tasks from perf/PMU.
>
> I think perf top seems to handle processes coming and going, so I don't
> think it's a fundamental limitation of perf, just our understanding :)
>
> I'd rather have one interface to maintain :)
Referencing my old branch when I barely started on per-task PMU, I think
that the idea was to add another i915 PMU instance which allows events
with tasks contexts.
Then in the implementation we would something like
i915_get_engine_busy_for_task(event->ctx->task).
This would work for "perf stat -e i915/rcs0-busy some-program".
But not for perf top - that one actually creates sampling counters which
need to provide things like PIDs and call-chains on each sample and I
don't see that we can ever do this.
Ignoring "perf top", we could implement a top like tool using the above
described new per-task PMU, but with two limitations:
1. No per-client support - only per-task.
2. More overhead - need a data structure, plus it's management, to map
from tasks to lists of drm clients etc.
My point is that I did not see the sysfs interface as a substantial
additional burden. Apart from the sysfs management bits, the rest is
actually building blocks for per-task PMU. Because the solution from
point 2 above would still need to aggregate the per-client stats, after
it is able to walk per-task clients.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-15 10:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 18:50 [RFC 0/5] Per-client engine stats Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 1/5] drm/i915: Track per-context engine busyness Tvrtko Ursulin
2018-02-14 19:07 ` Chris Wilson
2018-02-15 9:29 ` Tvrtko Ursulin
2018-02-15 9:35 ` Chris Wilson
2018-02-14 18:50 ` [RFC 2/5] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2018-02-14 19:13 ` Chris Wilson
2018-02-15 9:35 ` Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 3/5] drm/i915: Update client name on context create Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 4/5] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2018-02-14 19:17 ` Chris Wilson
2018-02-15 9:41 ` Tvrtko Ursulin
2018-02-15 9:44 ` Chris Wilson
2018-02-15 15:13 ` Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 5/5] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2018-02-14 18:55 ` ✗ Fi.CI.CHECKPATCH: warning for Per-client " Patchwork
2018-02-14 19:11 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-14 19:20 ` [RFC 0/5] " Chris Wilson
2018-02-15 9:44 ` Tvrtko Ursulin
2018-02-15 9:47 ` Chris Wilson
2018-02-15 10:50 ` Tvrtko Ursulin [this message]
2018-02-15 2:19 ` ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e45d268e-5154-bded-ef58-ae94d46fd1a4@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox