From: Robert Bragg <robert@sixbynine.org>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Robert Bragg <robert@sixbynine.org>,
intel-gfx@lists.freedesktop.org,
Daniel Vetter <daniel.vetter@intel.com>,
Sourab Gupta <sourab.gupta@intel.com>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
David Airlie <airlied@linux.ie>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>, Kan Liang <kan.liang@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Zheng Yan <zheng.z.yan@intel.com>,
Mark Rutland <mark.rutland@arm.com>,
Matt Fleming <matt.fleming@intel.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-api@vger.kernel.org
Subject: Re: [RFC 0/6] Non perf based Gen Graphics OA unit driver
Date: Wed, 30 Sep 2015 14:36:41 +0100 [thread overview]
Message-ID: <CAMou1-1WQ5NtQtboXbZq67___ObaaT9qt_OmwUVNBdUA5b5uww@mail.gmail.com> (raw)
In-Reply-To: <20150930083027.GF9929@nuc-i3427.alporthouse.com>
[-- Attachment #1.1: Type: text/plain, Size: 3503 bytes --]
On Wed, Sep 30, 2015 at 9:30 AM, Chris Wilson <chris@chris-wilson.co.uk>
wrote:
> On Tue, Sep 29, 2015 at 03:39:03PM +0100, Robert Bragg wrote:
> > Updating Mesa and GPU Top to experiment with this was straightforward
> > given the similarity to the perf interface. The main difference is that
> > it only supports forwarding metrics via read()s instead of an mmaped
> > circular buffer. As mentioned above, I think that suits this well, and
> > requires no additional copying of data. I think the userspace code has
> > ended up being a little simpler too.
>
> Did you try updating the existing perf based overlay?
>
I don't recall the overlay attempting to read OA counters, but potentially
it could be quite nice to add support - sorry I hadn't considered that so
far.
I don't believe being perf based or not will affect the effort to do this
though. The perf based driver doesn't handle OA counter normalization in
the kernel so userspace needs to be able to handle that - which is probably
the bigger effort.
Something to note here about your early pmu driver, is that it was notably
for counters that were explicitly sampled from the cpu using a hrtimer via
mmio. I think they were a better fit for the existing perf design than the
OA unit, primarily because they were explicitly read from the cpu and each
counter was very independent.
>
> > Overall the driver currently isn't much more code than with perf (~200
> > lines).
> >
> > Personally my gut feeling a.t.m, is that we should aim to move forward
> > independent from perf.
> >
> > I'd really appreciate some feedback from others on this though.
> >
> > Daniel and Chris; although I think it made sense at the outset to try
> > and use perf, in light of the above would you be open to a non-perf
> > based driver for the OA unit?
>
> No. I strongly dislike that they will be multiple incompatibile perf
> interfaces and strongly like the coupling with other profiling that
> comes with perf - i.e. we very much want to simultaneously sample CPU
> and GPU workloads along with other devices, that information is much
> more useful to me for the purposes of scheduling work and maximising
> concurrency than optimising shaders.
>
In this case I don't think there's inherently any more compatibility that
comes from using perf or not - no existing userspace will Just Work™ with
the perf based OA driver.
I think some of the cases you're referring to may be ok to expose via the
existing perf infrastructure, but I'm currently enabling the OA unit which
poses some unique difficulties I've tried to explain.
A guiding differentiator may be whether or not the counter is orthogonal
(in terms of configuration and normalization) and explicitly readable from
the cpu, as to whether the existing perf pmu infrastructure is a good fit.
'i915 perf' shows my lack of imagination naming this and maybe another name
could imply a more limited scope. I.e. on a case by case basis, when
looking to expose a new counters we can still evaluate whether it makes
sense to expose via the existing perf infrastructure or this.
- Robert
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
[-- Attachment #1.2: Type: text/html, Size: 4713 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-30 13:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 14:39 [RFC 0/6] Non perf based Gen Graphics OA unit driver Robert Bragg
2015-09-29 14:39 ` [RFC 1/6] drm/i915: Add i915 perf infrastructure Robert Bragg
2015-09-29 14:39 ` [RFC 2/6] drm/i915: rename OACONTROL GEN7_OACONTROL Robert Bragg
2015-09-29 14:39 ` [RFC 3/6] drm/i915: Add static '3D' Haswell OA unit config Robert Bragg
2015-09-29 14:39 ` [RFC 4/6] drm/i915: Add i915 perf event for Haswell OA unit Robert Bragg
2015-09-29 14:55 ` [Intel-gfx] " kbuild test robot
2015-09-29 15:18 ` Peter Zijlstra
2015-09-29 23:19 ` [kbuild-all] " Fengguang Wu
2015-09-29 14:39 ` [RFC 6/6] drm/i915: add oa_event_min_timer_exponent sysctl Robert Bragg
2015-09-30 3:23 ` [RFC 0/6] Non perf based Gen Graphics OA unit driver Zhenyu Wang
[not found] ` <1443537549-6905-1-git-send-email-robert-St23OQVBDYPNLxjTenLetw@public.gmane.org>
2015-09-29 14:39 ` [RFC 5/6] drm/i915: Add dev.i915.perf_event_paranoid sysctl option Robert Bragg
2015-09-30 8:30 ` [RFC 0/6] Non perf based Gen Graphics OA unit driver Chris Wilson
2015-09-30 13:36 ` Robert Bragg [this message]
2015-10-16 9:43 ` Peter Zijlstra
2015-10-16 10:02 ` Ingo Molnar
2015-10-16 10:33 ` Peter Zijlstra
[not found] ` <20151016103345.GS3816-ndre7Fmf5hadTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2015-10-16 12:08 ` Robert Bragg
2015-10-20 20:16 ` Robert Bragg
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=CAMou1-1WQ5NtQtboXbZq67___ObaaT9qt_OmwUVNBdUA5b5uww@mail.gmail.com \
--to=robert@sixbynine.org \
--cc=airlied@linux.ie \
--cc=alexander.shishkin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kan.liang@intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matt.fleming@intel.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sourab.gupta@intel.com \
--cc=zheng.z.yan@intel.com \
--cc=zhenyuw@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).