From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt] igt/perf_pmu: Recalibrate interrupt loop.
Date: Fri, 24 Nov 2017 09:52:23 +0000 [thread overview]
Message-ID: <f29fa524-cf7b-66f7-3a8a-2b6ef7bbc5e6@linux.intel.com> (raw)
In-Reply-To: <151151570816.1746.13311334538378097509@mail.alporthouse.com>
On 24/11/2017 09:28, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-24 09:11:06)
>>
>> On 23/11/2017 15:03, Chris Wilson wrote:
>>> We have to be careful in our calibration loop, too slow and we timeout,
>>> too fast and we don't emit an interrupt! On fast legacy devices, we
>>> would overflow the calibration calcuation...
>>>
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> ---
>>> - sz = ALIGN(sz, sizeof(uint32_t));
>>> + sz = calibrate_nop(gem_fd, 1e6 / target);
>>> + gem_quiescent_gpu(gem_fd);
>>> +
>>> + fd = open_pmu(I915_PMU_INTERRUPTS);
>>> + spin = igt_spin_batch_new(gem_fd, 0, 0, 0);
>>
>> What's the spin batch for?
>
> It's just a plug to ensure that the queue of calibrated execs don't start
> executing before we're waiting on them. Instead of doing exec + sync, we
> want to switch to exec[N] + sync.
Of course, makes sense.
Only improvement I can think of is to define the target time (1e6) and
poll timeout (2000ms) from a common local variable.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-24 9:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 15:03 [PATCH igt] igt/perf_pmu: Recalibrate interrupt loop Chris Wilson
2017-11-23 19:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-23 23:33 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-11-24 9:11 ` [PATCH igt] " Tvrtko Ursulin
2017-11-24 9:28 ` Chris Wilson
2017-11-24 9:52 ` Tvrtko Ursulin [this message]
2017-11-24 10:40 ` Chris Wilson
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=f29fa524-cf7b-66f7-3a8a-2b6ef7bbc5e6@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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