public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: "Owen Taylor" <otaylor@redhat.com>,
	intel-gfx@lists.freedesktop.org, "Zhuang,
	Lena" <lena.zhuang@intel.com>,
	"Stéphane Marchesin" <stephane.marchesin@gmail.com>
Subject: Re: [PATCH 3/3] drm/i915: Tweak RPS thresholds to more aggressively downclock
Date: Thu, 3 Oct 2013 09:41:35 +0200	[thread overview]
Message-ID: <20131003074135.GE31334@phenom.ffwll.local> (raw)
In-Reply-To: <20131001150401.39daf403@jbarnes-t420>

On Tue, Oct 01, 2013 at 03:04:01PM -0700, Jesse Barnes wrote:
> On Wed, 25 Sep 2013 17:34:57 +0100
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 
> > After applying wait-boost we often find ourselves stuck at higher clocks
> > than required. The current threshold value requires the GPU to be
> > continuously and completely idle for 313ms before it is dropped by one
> > bin. Conversely, we require the GPU to be busy for an average of 90% over
> > a 84ms period before we upclock. So the current thresholds almost never
> > downclock the GPU, and respond very slowly to sudden demands for more
> > power. It is easy to observe that we currently lock into the wrong bin
> > and both underperform in benchmarks and consume more power than optimal
> > (just by repeating the task and measuring the different results).
> > 
> > An alternative approach, as discussed in the bspec, is to use a
> > continuous threshold for upclocking, and an average value for downclocking.
> > This is good for quickly detecting and reacting to state changes within a
> > frame, however it fails with the common throttling method of waiting
> > upon the outstanding frame - at least it is difficult to choose a
> > threshold that works well at 15,000fps and at 60fps. So continue to use
> > average busy/idle loads to determine frequency change.
> > 
> > v2: Use 3 power zones to keep frequencies low in steady-state mostly
> > idle (e.g. scrolling, interactive 2D drawing), and frequencies high
> > for demanding games. In between those end-states, we use a
> > fast-reclocking algorithm to converge more quickly on the desired bin.
> > 
> > v3: Bug fixes - make sure we reset adj after switching power zones.
> > 
> > v4: Tune - drop the continuous busy thresholds as it prevents us from
> > choosing the right frequency for glxgears style swap benchmarks. Instead
> > the goal is to be able to find the right clocks irrespective of the
> > wait-boost.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Kenneth Graunke <kenneth@whitecape.org>
> > Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
> > Cc: Owen Taylor <otaylor@redhat.com>
> > Cc: "Meng, Mengmeng" <mengmeng.meng@intel.com>
> > Cc: "Zhuang, Lena" <lena.zhuang@intel.com>
> > ---
> 
> It's a little scary to mess with these, but we've gotten some good
> numbers so far so I guess it's ok.
> 
> As a follow up, it might be nice to expose the power, balanced,
> performance profiles to userspace via sysfs.  Since we can't solve this
> problem for all users and all needs, we can just punt it out to
> userspace. :)
> 
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

All three merged, thanks for patches&review. I've frobbed the first two
with tiny style bikesheds:
- Dropped the typedef usage for the plain struct drm_i915_private in new
  code.
- Dropped the extern qualifier for the function prototypes in header
  files.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2013-10-03  7:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 16:34 [PATCH 1/3] drm/i915: Fix __wait_seqno to use true infinite timeouts Chris Wilson
2013-09-25 16:34 ` [PATCH 2/3] drm/i915: Boost RPS frequency for CPU stalls Chris Wilson
2013-10-01 21:54   ` Jesse Barnes
2013-10-01 21:56     ` Jesse Barnes
2013-10-01 22:23     ` Chris Wilson
2013-10-01 22:39       ` Jesse Barnes
2013-10-02  0:33         ` Chris Wilson
2013-10-02 18:26           ` Jesse Barnes
2013-10-02 21:57             ` Chris Wilson
2013-10-02 22:18               ` Jesse Barnes
2013-10-02 22:20                 ` Jesse Barnes
2013-10-02 23:19                   ` Chris Wilson
2013-09-25 16:34 ` [PATCH 3/3] drm/i915: Tweak RPS thresholds to more aggressively downclock Chris Wilson
2013-10-01 22:04   ` Jesse Barnes
2013-10-03  7:41     ` Daniel Vetter [this message]

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=20131003074135.GE31334@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lena.zhuang@intel.com \
    --cc=otaylor@redhat.com \
    --cc=stephane.marchesin@gmail.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