All of lore.kernel.org
 help / color / mirror / Atom feed
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: [PATCH] drm/i915/pmu: Do not assume fixed hrtimer period
Date: Mon, 4 Jun 2018 16:01:26 +0100	[thread overview]
Message-ID: <2547acb2-c7e0-b427-6ce8-ae1f4e8dbb2e@linux.intel.com> (raw)
In-Reply-To: <152811738922.7032.4810588326807036972@mail.alporthouse.com>


On 04/06/2018 14:03, Chris Wilson wrote:
> Quoting Chris Wilson (2018-06-04 13:59:12)
>> Quoting Tvrtko Ursulin (2018-06-04 13:52:39)
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> As Chris has discovered on his Ivybridge, and later automated test runs
>>> have confirmed, on most of our platforms hrtimer faced with heavy GPU load
>>> ca occasionally become sufficiently imprecise to affect PMU sampling
>>
>> s/ca/can/
>>
>>> calculations.
>>>
>>> This means we cannot assume sampling frequency is what we asked for, but
>>> we need to measure the interval ourselves.
>>>
>>> This patch is similar to Chris' original proposal for per-engine counters,
>>> but instead of introducing a new set to work around the problem with
>>> frequency sampling, it swaps around the way internal frequency accounting
>>> is done. Instead of accumulating current frequency and dividing by
>>> sampling frequency on readout, it accumulates frequency scaled by each
>>> period.
>>
>> My ulterior motive failed to win favour ;)
>>   
>>> Testcase: igt/perf_pmu/*busy* # snb, ivb, hsw
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> I should point out that even with this fix (or rather my patch), we can

I did not mean to steal it, just that you seemed very uncompromising on 
the new counters approach. If you prefer you can respin your patch with 
this approach for frequency counters, it is fine by me.

> still see errors of 25-30us, enough to fail the test. However, without
> the fix our errors can be orders of magnitude worse (e.g. reporting 80us
> busy instead of 500us).

Yeah I guess if the timer is delayed it is delayed and all samples just 
won't be there. I don't see a way to fix that elegantly. Even practically.

Regards,

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

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 12:52 [PATCH] drm/i915/pmu: Do not assume fixed hrtimer period Tvrtko Ursulin
2018-06-04 12:59 ` Chris Wilson
2018-06-04 13:03   ` Chris Wilson
2018-06-04 15:01     ` Tvrtko Ursulin [this message]
2018-06-04 15:11       ` Chris Wilson
2018-06-05  8:51         ` Tvrtko Ursulin
2018-06-05  9:06           ` Chris Wilson
2018-06-05 11:35             ` Tvrtko Ursulin
2018-06-05 11:42               ` Chris Wilson
2018-06-04 13:05 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-04 13:26 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-04 14:17 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-05 10:57 ` ✗ Fi.CI.BAT: failure for drm/i915/pmu: Do not assume fixed hrtimer period (rev2) 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=2547acb2-c7e0-b427-6ce8-ae1f4e8dbb2e@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.