From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 0/8] Engine Busyness
Date: Thu, 21 Dec 2023 09:36:41 +0000 [thread overview]
Message-ID: <ebcec5e0-236c-4cd9-b676-d7ca7d46cb10@linux.intel.com> (raw)
In-Reply-To: <ZYN/mkkRT+oFJLSo@unerlige-ril>
On 20/12/2023 23:58, Umesh Nerlige Ramappa wrote:
> On Wed, Dec 20, 2023 at 09:00:34AM +0000, Tvrtko Ursulin wrote:
>>
>> On 20/12/2023 05:36, Umesh Nerlige Ramappa wrote:
>>> On Thu, Dec 14, 2023 at 08:06:46AM +0000, Tvrtko Ursulin wrote:
>>>>
>>>> On 14/12/2023 01:56, Umesh Nerlige Ramappa wrote:
>>>>> On Thu, Dec 07, 2023 at 02:45:47PM +0000, Tvrtko Ursulin wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> On 07/12/2023 12:57, Riana Tauro wrote:
>>>>>>> GuC provides engine busyness ticks as a 64 bit counter which count
>>>>>>> as clock ticks. These counters are maintained in a
>>>>>>> shared memory buffer and internally updated on a continuous basis.
>>>>>>>
>>>>>>> GuC also provides a periodically total active ticks that GT has been
>>>>>>> active for. This counter is exposed to the user such that
>>>>>>> busyness can
>>>>>>> be calculated as a percentage using
>>>>>>>
>>>>>>> busyness % = (engine active ticks/total active ticks) * 100.
>>>>>>
>>>>>> I think I've asked this before but don't remember it was clarified
>>>>>> - what are the semantics of "active" with total active ticks? In
>>>>>> other words considering activity timelines like:
>>>>>>
>>>>>> 1)
>>>>>> 0 1s
>>>>>> rcs0 |xxxxx-----|
>>>>>> bcs0 |-----xxxxx|
>>>>>>
>>>>>> 2)
>>>>>> 0 1s
>>>>>> rcs0 |xxxxx-----|
>>>>>> bcs0 |xxxxx-----|
>>>>>>
>>>>>> Assuming 1s sampling, would the above formula correctly say 50%
>>>>>> for both engines in both cases?
>>>>>
>>>>> Yes. What is the significance of case 2? Are you saying rcs and bcs
>>>>> are executing in parallel?
>>>>
>>>> In parallel yes. Complete overlap, no overlap, or any overlap of
>>>> activity in between the two.
>>>
>>> GuC accumulates this on context switches, so the overlap does not
>>> matter.
>>>
>>>>
>>>>> Either ways, when total active ticks is queried it would provide
>>>>> the latest value of the active time (does not depend on gt
>>>>> park/unpark since the value is either obtained on demand from GuC
>>>>> or is a value that is frequently updated by GuC.
>>>>>
>>>>> The duration of context (in to out) is accumulated for the each
>>>>> engine.
>>>>
>>>> But why is the total *active* tick moving during the 0.5s - 1s time
>>>> of the 2nd diagram though? What does it mean by "active" if nothing
>>>> was active during that period?
>>>
>>> VF was still using it's allotted time and hence was active.
>>
>> And if we leave SR-IOV out for a moment?
>
> Then it is just a periodically sampled (by GuC) value of GT ticks. The
> period being 100ms.
>
>>
>> "GuC also provides a periodically total active ticks that GT has been
>> active for."
>>
>> How many time worth of total GT active ticks does GuC report in
>> diagram 2 above?
>
> Every 100ms we would see an updated value. For the duration of 0.5s, it
> would be 500ms. Sampled at 1s, it will be 1000ms. Until 0.5s it should
> be 100% busyness but there is an error margin of 100ms. From then on,
> the busyness % will decrease as time progresses. The error margin is
> more pronounced for very short workloads, so IGTs were changed to use 2s
> batch durations rather than 500ms. Haven't checked if IGTs have been
> posted yet though.
Sorry somehow it is still not clear to me. :)
GuC updates the GT total active ticks _constantly_? With a 100ms
sampling so like:
a)
while (true)
if (gt_active)
gt_total_active += 100ms
sleep(100ms)
Or b):
while (true)
gt_total_active += 100ms
sleep(100ms)
?
If a) then diagram 2) above would show 50% rcs0, no? (When sampled at
T=0 and T=1s and deltas calculated.)
If b) then "...total active ticks that GT has been active for." uses a
different definition of "GT active" than I am assuming? Like no relation
to whether any of the engines is used, just the fact GuC is loaded and
running?
Regards,
Tvrtko
>
> Regards,
> Umesh
>
>>
>> Regards,
>>
>> Tvrtko
>>
>>>
>>> Regards,
>>> Umesh
>>>
>>>>
>>>>>> I am also curious if there are plans to add support to
>>>>>> intel_gpu_top in which case please copy me on the required
>>>>>> refactorings.
>>>>>>
>>>>>
>>>>> Certainly. It's in the works.
>>>>
>>>> Cool.
>>>>
>>>> Regards,
>>>>
>>>> Tvrtko
next prev parent reply other threads:[~2023-12-21 9:36 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 12:57 [PATCH v2 0/8] Engine Busyness Riana Tauro
2023-12-07 12:53 ` ✓ CI.Patch_applied: success for Engine Busyness (rev2) Patchwork
2023-12-07 12:53 ` ✗ CI.checkpatch: warning " Patchwork
2023-12-07 12:54 ` ✓ CI.KUnit: success " Patchwork
2023-12-07 12:57 ` [PATCH v2 1/8] RFC drm/xe: Move user engine class mappings to functions Riana Tauro
2023-12-07 12:57 ` [PATCH v2 2/8] RFC drm/xe/guc: Add interface for engine busyness ticks Riana Tauro
2023-12-21 0:49 ` Umesh Nerlige Ramappa
2023-12-21 5:14 ` Riana Tauro
2023-12-07 12:57 ` [PATCH v2 3/8] RFC drm/xe/guc: Expose engine busyness only for supported GuC version Riana Tauro
2023-12-21 0:52 ` Umesh Nerlige Ramappa
2023-12-21 5:17 ` Riana Tauro
2023-12-07 12:57 ` [PATCH v2 4/8] RFC drm/xe/guc: Add PMU counter for total active ticks Riana Tauro
2023-12-07 12:57 ` [PATCH v2 5/8] RFC drm/xe/uapi: Add configs for Engine busyness Riana Tauro
2023-12-21 2:29 ` Umesh Nerlige Ramappa
2023-12-21 5:26 ` Riana Tauro
2023-12-07 12:58 ` [PATCH v2 6/8] RFC drm/xe/pmu: Add PMU counters for engine busy ticks Riana Tauro
2023-12-07 12:58 ` [PATCH v2 7/8] RFC drm/xe/guc: Dynamically enable/disable engine busyness stats Riana Tauro
2023-12-07 12:58 ` [PATCH v2 8/8] RFC drm/xe/guc: Handle runtime suspend issues for engine busyness Riana Tauro
2023-12-07 13:01 ` ✓ CI.Build: success for Engine Busyness (rev2) Patchwork
2023-12-07 13:02 ` ✓ CI.Hooks: " Patchwork
2023-12-07 13:03 ` ✓ CI.checksparse: " Patchwork
2023-12-07 13:39 ` ✗ CI.BAT: failure " Patchwork
2023-12-07 14:45 ` [PATCH v2 0/8] Engine Busyness Tvrtko Ursulin
2023-12-14 1:56 ` Umesh Nerlige Ramappa
2023-12-14 8:06 ` Tvrtko Ursulin
2023-12-20 5:36 ` Umesh Nerlige Ramappa
2023-12-20 9:00 ` Tvrtko Ursulin
2023-12-20 23:58 ` Umesh Nerlige Ramappa
2023-12-21 9:36 ` Tvrtko Ursulin [this message]
2023-12-21 13:17 ` Nerlige Ramappa, Umesh
2023-12-22 9:41 ` Tvrtko Ursulin
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=ebcec5e0-236c-4cd9-b676-d7ca7d46cb10@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=umesh.nerlige.ramappa@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