[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF6AEGsNHkODt4oOgAhLdrik1Jt-cfcyjk+nGzDhSMNfFMEWsA@mail.gmail.com>
Date: Mon, 28 Feb 2022 08:01:34 -0800
From: Rob Clark <robdclark@...il.com>
To: Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>
Cc: dri-devel <dri-devel@...ts.freedesktop.org>,
freedreno <freedreno@...ts.freedesktop.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Rob Clark <robdclark@...omium.org>,
Sean Paul <sean@...rly.run>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] drm/msm: Expose client engine utilization via fdinfo
On Mon, Feb 28, 2022 at 6:33 AM Tvrtko Ursulin
<tvrtko.ursulin@...ux.intel.com> wrote:
>
>
> On 25/02/2022 22:14, Rob Clark wrote:
> > On Fri, Feb 25, 2022 at 12:25 PM Rob Clark <robdclark@...il.com> wrote:
> >>
> >> From: Rob Clark <robdclark@...omium.org>
> >>
> >> Similar to AMD commit
> >> 874442541133 ("drm/amdgpu: Add show_fdinfo() interface"), using the
> >> infrastructure added in previous patches, we add basic client info
> >> and GPU engine utilisation for msm.
> >>
> >> Example output:
> >>
> >> # cat /proc/`pgrep glmark2`/fdinfo/6
> >> pos: 0
> >> flags: 02400002
> >> mnt_id: 21
> >> ino: 162
> >> drm-driver: msm
> >> drm-client-id: 7
> >> drm-engine-gpu: 1734371319 ns
> >> drm-cycles-gpu: 1153645024
>
> Nice, so my vendor agnostic actually worked (with that single fixup of
> accounting for the fact pdev tag is optional)?
>
> > Note that it might be useful to have a standardized way to report # of
> > cycles and max freq, so userspace tool can derive %utilization in
> > addition to just %busy
>
> How do you define %utilisation vs %busy - I don't exactly follow since I
> see the two as same?
so, say you are running at 50% of max clk, and gpu is busy 70% of the
time. The utilization is only 35% because the gpu could scale up the
clk to get more work done.
> Looking at your patch I guess I don't understand the difference between
> 'elapsed' and 'cycles' inside your retire_submit(). Both are scoped to a
> single context and are not global? If 'elapsed' is time context has
> spent on the GPU, cycles isn't the same just in a different unit?
Correct, we capture (from GPU cmdstream) two counters both before and
after a submit (aka execbuf) runs, one is a fixed-rate counter, which
gives us elapsed time. The second is a counter that increments every
clk cycle, which gives us the # of cycles. With the two values, we
can calculate GPU frequency.
BR,
-R
> Regards,
>
> Tvrtko
>
Powered by blists - more mailing lists