From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Use consistent forcewake auto-release timeout across kernel configs
Date: Tue, 5 Apr 2016 09:54:58 +0100 [thread overview]
Message-ID: <57037D62.2060502@linux.intel.com> (raw)
In-Reply-To: <20160404185809.GA5867@nuc-i3427.alporthouse.com>
On 04/04/16 19:58, Chris Wilson wrote:
> On Mon, Apr 04, 2016 at 05:51:09PM +0100, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Current implementation releases the forcewake at any time between
>> straight away, and one jiffie from the last put, or first automatic
>> grab.
>
> That isn't the problem though. The problem is that we set the timer on
> first use rather than last use. All you are stating here is that by
> lengthening the timeout on your system you reduce the number of times it
> times out.
It is true the reduction I see is due lengthening of the average timeout.
But with regards to re-arming approach, I thought so initially myself,
but then, if we expect bursty access then it shouldn't matter and the
simplicity of doing it like it currently is better.
Even in practice, I noticed the effect of lengthening the timeout is
much greater than moving the arming to the last access. And to get to
very few to none auto releases on busy workloads we need in the regions
of 5ms, which would be a big change. Or maybe not if you consider HZ=100
kernels.
It is very difficult to know what is actually better considering power
between the CPU and GPU and performance. So I though the best would be
to keep it similar to the current timings, just fix the dependency on HZ
and also slack with hrtimers might help with something.
As a final data point, explicit puts and auto releases seems to be
relatively balanced in my testing. With this patch T-Rex for example
auto-releases in the region of 3-4 times in 10ms, with around 5-10
explicit gets, and 5-10 implicit gets in 10ms.
A different, interrupt heavy workload (~20k irqs/sec) manages similarly
2-4 auto-releases per 10ms, and has ~250 explicit gets and ~380 implicit
per 10ms.
Looking at the two I think the fact they manage to auto-release
relatively similarly, compared to a huge different in fw gets, suggest
burstyness. So I am not sure that any smarts with the release period
would be interesting. At least not without serious power/perf measurements.
> Having said that, the conversion to hrtimer seems sensible but to add
> tracking of the last access as opposed to first we either fallback to
> jiffie (in which case hrtimer is moot) or rely on ktime_get_raw() being
> fast enough for every register write. Hmm, my usual response to that has
> been if it matters we avoid the heavyweight macros and use the _FW
> interface - or even raw readl/writel.
>
> Could you try storing ktime_get_raw() on every access and rearming the
> timer if it expires before last-access + min-period?
That would be similar to your patch from before my holiday, right? As I
said above, I did not notice much change with that approach. Just
extending the timeout has a much greater effect, but as I wrote above, I
am not sure we want to change it.
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:[~2016-04-05 8:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 16:51 [PATCH 1/3] drm/i915: Use consistent forcewake auto-release timeout across kernel configs Tvrtko Ursulin
2016-04-04 16:51 ` [PATCH 2/3] drm/i915: Simplify for_each_fw_domain iterators Tvrtko Ursulin
2016-04-04 19:00 ` Chris Wilson
2016-04-04 19:14 ` Dave Gordon
2016-04-05 9:05 ` Tvrtko Ursulin
2016-04-05 9:36 ` Chris Wilson
2016-04-04 16:51 ` [PATCH 3/3] drm/i915: Do not serialize forcewake acquire across domains Tvrtko Ursulin
2016-04-04 19:07 ` Chris Wilson
2016-04-05 9:02 ` Tvrtko Ursulin
2016-04-05 9:47 ` Chris Wilson
2016-04-04 18:58 ` [PATCH 1/3] drm/i915: Use consistent forcewake auto-release timeout across kernel configs Chris Wilson
2016-04-04 19:41 ` Dave Gordon
2016-04-04 20:22 ` Chris Wilson
2016-04-05 8:54 ` Tvrtko Ursulin [this message]
2016-04-05 8:59 ` Chris Wilson
2016-04-05 10:02 ` Tvrtko Ursulin
2016-04-05 10:44 ` Chris Wilson
2016-04-04 18:58 ` Dave Gordon
2016-04-05 6:26 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] " Patchwork
2016-04-05 11:01 ` [PATCH v2 1/3] " Tvrtko Ursulin
2016-04-05 11:01 ` [PATCH v2 2/3] drm/i915: Simplify for_each_fw_domain iterators Tvrtko Ursulin
2016-04-05 11:01 ` [PATCH v2 3/3] drm/i915: Do not serialize forcewake acquire across domains Tvrtko Ursulin
2016-04-05 11:22 ` [PATCH v2 1/3] drm/i915: Use consistent forcewake auto-release timeout across kernel configs 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=57037D62.2060502@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
/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