Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eero Tamminen <eero.t.tamminen@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v2] intel-gpu-top: Rewrite the tool to be safe to use
Date: Wed, 4 Apr 2018 15:15:38 +0300	[thread overview]
Message-ID: <a6bd5129-cfa5-8a71-4867-e0c2826f720f@intel.com> (raw)
In-Reply-To: <2186ab0f-38d1-c589-2fd1-286b746dcd3b@linux.intel.com>

Hi,

I've now tested v5 with old Ubuntu kernel on KBL, and with latest
drm-tip kernel on SNB, HSW, BYT, BSW and BDW GT & GT3.


Generic test results
--------------------

* Tool works on all of them

* The new error messages and headings look good

* Idle IMC read amounts correspond to expected values on SNB & HSW.
   The much smaller values on BDW & SKL are due to FBC (how well
   it compresses, naturally depends on screen content).


BYT & BSW
---------

* IMC, power usage and actual(?) freq values are missing.

-> You can get actual freq by polling CAGF register, represented by:
	/sys/class/drm/card0/gt_act_freq_mhz

Normally i915 driver maps uncore power usage to GPU power usage,
but BYT is missing that (and ram power usage).  However, RAPL
does report package & core values...


Suggestions
-----------

Maybe on platforms where RAPL doesn't report "uncore" power usage,
you could just deduct RAPL reported "core" power consumption from
the "package" power consumption, and report that as "GPU" power
usage?  (Or do that in i915 directly)


You need also to either update the manual, or implement -o and -e
options for the new version of intel_gpu_top.  CSV output of all
the reported values would be nice.

You might mention in manual as an example how to calculate
idle screen update bandwidth, and that it's impacted by:
- PSR (panel self refresh, depends on display supporting it):
   /sys/kernel/debug/dri/0/i915_edp_psr_status
- FBC (frame buffer compression, enabled on newer GENs)
   /sys/kernel/debug/dri/0/i915_fbc_status
- end-to-end RBC (render buffer compression, requires modifiers
   support i.e. GEN9+ GPU and X & Mesa with DRI3 v1.2 [1] support)


	- Eero

[1] Requires building latest git versions of Mesa, libxcb, X server
and few other things, and adding this to X server config:
-------------------------------
Section "ServerFlags"
     Option "Debug" "dmabuf_capable"
EndSection
-------------------------------


On 03.04.2018 20:18, Tvrtko Ursulin wrote:
> On 03/04/2018 15:06, Eero Tamminen wrote:
>> On 03.04.2018 12:36, Tvrtko Ursulin wrote:
>>> On 29/03/2018 15:30, Eero Tamminen wrote:
[...]
>>>> Old tool showed also GPU system memory interface (GAM) busyness.
>>>> That was valuable info, and reasonably accurate for stable loads.
>>>>
>>>> Could this tool show also either that information (preferred), or
>>>> bandwidth utilized by GPU/CPU/display?
>>>>
>>>> (Latest kernels offer GPU memory bandwidth usage through perf
>>>> "uncore_imc" "data_reads" & "date_writes" counters.)
>>>
>>> Excellent suggestion and I've added IMC data_reads and data_writes to 
>>> the tool.
>>
>> Thanks, it looks fine too.  I'm just wondering about the numbers
>> it's reporting on SKL GT2...
>>
>> AFAIK IMC counters are for uncore, so I though that they should
>> correspond to GTI (memory interface to outside of GPU) read and
>> write HW counter values.  While it seemed in some cases quite close,
>> in some cases the it showed a lot smaller (2/3) value than expected.
>>
>> I can understand why reads are sometimes larger, because I think
>> uncore will include also display engine display content reads.
>>
>> However, I don't see how uncore writes could be considerably smaller
>> than the GTI interface write amount.
>>
>> (GTI interface reports the expected value which corresponds directly
>> to what my test application is doing (64x blended FullHD layer writes).)
>>
>> Idle machine read amounts are also much smaller (60-65MB/s) than what
>> I think display update read should be (1920*1080*4*60Hz = 475MiB/s).
>>
>> Any ideas for these two discrepancies?
> 
> I'm afraid I am not familiar with the uncore IMC, but we could always 
> approach its authors?
> 
>>>> Is "wait" value supposed to be IO-wait for given engine interface?
>>>>
>>>> I never saw that change from 0%, although IO-wait in top jumped
>>>> from 0 to 20-30% with my test GPU load.
>>>
>>> No, that is time spent in MI_WAIT_FOR_EVENT.
>>
>> Could you add that info to the UI?
>>
>> E.g. just have "MI" on top of the "wait" column.
> 
> Like a full header strip? Yeah makes sense, I'll add it.
> 
>>  > I think not very used in current codebase.
>>
>> What you're using to validate that it reports correct value?
> 
> That would be igt/tests/perf_pmu/event-wait-rcs0.
> 
>>
>>>> HW specific test results
>>>> ------------------------
>>>>
>>>> BYT:
>>>> * Reports "Failed to initialize PMU!" although old intel_gpu_top
>>>>    works fine.
>>>>
>>>> HSW GT2,  BDW GT3, SKL GT2 and KBL GT3e seems to work fine except
>>>> for the "wait" value.
>>>>
>>>> I never saw blitter engine to do anything, but that's because
>>>> modesetting uses just 3D pipeline, and because I couldn't get
>>>> Intel DDX to work with rest of latest git version of X / 3D stack.
>>>
>>> Thank you for testing this so thoroughly - this was really invaluable 
>>> since I don't have access too such number of platforms. I've tried to 
>>> fix all this in the latest version.
>>
>> Machines are currently running tests, I'll check these tomorrow.
> 
> Thanks!
> 
>>
>>>> Kernel version support
>>>> ----------------------
>>>>
>>>> My HW specific testing above was with drm-tip kernel, but I did one 
>>>> test
>>>> also with Ubuntu 16.04 v4.4 kernel (which includes v4.6 or v4.8 i915 
>>>> backport) on KBL.  For that, the tool reported:
>>>> "Failed to detect engines!"
>>>>
>>>> Although the previous intel_gpu_top works fine with that kernel 
>>>> version.
>>>>
>>>> Same happens also with Ubuntu 17.04 v4.13 kernel.
>>>>
>>>>
>>>> -> If new version needs a certain kernel version, it should tell
>>>>     which version is required.
>>>
>>> Yep, at least 4.16 is needed so I have added this info to the error 
>>> message.
>>
>> IMHO the message is a bit ambivalent:
>>      Failed to detect engines! Kernel 4.16 or newer?
>>
>> I would suggest checking whether kernel is new enough, and if not:
>>      Kernel X.YY detected, 4.16 or newer required.
> 
> Maybe yeah. I was planning to improve error messages altogether but 
> forgot. Will see what improvements make sense.
> 
> Regards,
> 
> Tvrtko

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-04-04 12:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 18:29 [Intel-gfx] [RFC i-g-t] intel-gpu-top: Rewrite the tool to be safe to use Tvrtko Ursulin
2018-03-28 18:35 ` [igt-dev] " Chris Wilson
2018-03-28 18:56 ` Lionel Landwerlin
2018-03-29  0:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-03-29  8:20 ` [Intel-gfx] [RFC i-g-t] " Petri Latvala
2018-03-29  9:46 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2018-03-29 10:33 ` [igt-dev] [PATCH i-g-t v2] " Tvrtko Ursulin
2018-03-29 14:30   ` [Intel-gfx] " Eero Tamminen
2018-03-29 18:46     ` [igt-dev] [PATCH i-g-t v3] " Tvrtko Ursulin
     [not found]       ` <1522437301.774767662@f417.i.mail.ru>
2018-04-03  9:14         ` [Intel-gfx] [PATCH i-g-t v4] " Tvrtko Ursulin
2018-04-03  9:38         ` [igt-dev] [PATCH i-g-t v3] " Tvrtko Ursulin
2018-03-29 19:10     ` [igt-dev] ✓ Fi.CI.BAT: success for intel-gpu-top: Rewrite the tool to be safe to use (rev3) Patchwork
2018-03-29 23:29     ` [igt-dev] ✗ Fi.CI.IGT: warning " Patchwork
2018-04-03  9:36     ` [Intel-gfx] [igt-dev] [PATCH i-g-t v2] intel-gpu-top: Rewrite the tool to be safe to use Tvrtko Ursulin
2018-04-03 14:06       ` Eero Tamminen
2018-04-03 17:18         ` Tvrtko Ursulin
2018-04-04 12:15           ` Eero Tamminen [this message]
2018-04-04 12:42             ` [Intel-gfx] " Tvrtko Ursulin
2018-04-04 14:23               ` Eero Tamminen
2018-04-04 15:24                 ` Tvrtko Ursulin
2018-03-29 16:27   ` Chris Wilson
     [not found] ` <1522267876.37140964@f337.i.mail.ru>
2018-03-29 10:49   ` [Intel-gfx] [igt-dev] [RFC i-g-t] " Tvrtko Ursulin
2018-03-29 15:59 ` [igt-dev] ✓ Fi.CI.BAT: success for intel-gpu-top: Rewrite the tool to be safe to use (rev2) Patchwork
2018-03-29 20:23 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-04-04  9:48 ` [igt-dev] [PATCH i-g-t v5] intel-gpu-top: Rewrite the tool to be safe to use Tvrtko Ursulin
2018-04-04 15:26   ` [igt-dev] [PATCH i-g-t v6] " Tvrtko Ursulin
2018-04-09 12:26     ` Tvrtko Ursulin
2018-05-29  9:58     ` Matthew Auld
2018-04-04 13:27 ` [igt-dev] ✓ Fi.CI.BAT: success for intel-gpu-top: Rewrite the tool to be safe to use (rev4) Patchwork
2018-04-04 15:53 ` [igt-dev] ✗ Fi.CI.BAT: failure for intel-gpu-top: Rewrite the tool to be safe to use (rev5) Patchwork
2018-04-04 16:56 ` [igt-dev] ✗ Fi.CI.IGT: warning for intel-gpu-top: Rewrite the tool to be safe to use (rev4) 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=a6bd5129-cfa5-8a71-4867-e0c2826f720f@intel.com \
    --to=eero.t.tamminen@intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tursulin@ursulin.net \
    --cc=tvrtko.ursulin@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