From: Daniel Vetter <daniel@ffwll.ch>
To: "Daniel, Thomas" <thomas.daniel@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/4] drm/i915/bdw: Clean up execlist queue items in retire_work
Date: Mon, 3 Nov 2014 17:17:28 +0100 [thread overview]
Message-ID: <20141103161728.GD26941@phenom.ffwll.local> (raw)
In-Reply-To: <BFEE8FEC12424048AF1805991D65FA91196D8C38@IRSMSX105.ger.corp.intel.com>
On Mon, Nov 03, 2014 at 04:05:03PM +0000, Daniel, Thomas wrote:
> > -----Original Message-----
> > From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel
> > Vetter
> > Sent: Monday, November 03, 2014 3:33 PM
> > To: Daniel, Thomas
> > Cc: intel-gfx@lists.freedesktop.org; shuang.he@linux.intel.com
> > Subject: Re: [Intel-gfx] [PATCH 1/4] drm/i915/bdw: Clean up execlist queue
> > items in retire_work
> >
> > On Wed, Oct 29, 2014 at 09:52:50AM +0000, Thomas Daniel wrote:
> > > No longer create a work item to clean each execlist queue item.
> > > Instead, move retired execlist requests to a queue and clean up the
> > > items during retire_requests.
> > >
> > > v2: Fix legacy ring path broken during overzealous cleanup
> > >
> > > v3: Update idle detection to take execlists queue into account
> > >
> > > Issue: VIZ-4274
> > > Signed-off-by: Thomas Daniel <thomas.daniel@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/i915_gem.c | 4 +++
> > > drivers/gpu/drm/i915/intel_lrc.c | 52 ++++++++++++++++++-----------
> > --
> > > drivers/gpu/drm/i915/intel_lrc.h | 2 +-
> > > drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
> > > 4 files changed, 36 insertions(+), 23 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_gem.c
> > > b/drivers/gpu/drm/i915/i915_gem.c index 827edb5..df28202 100644
> > > --- a/drivers/gpu/drm/i915/i915_gem.c
> > > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > > @@ -2718,6 +2718,10 @@ i915_gem_retire_requests(struct drm_device
> > *dev)
> > > for_each_ring(ring, dev_priv, i) {
> > > i915_gem_retire_requests_ring(ring);
> > > idle &= list_empty(&ring->request_list);
> > > + if (i915.enable_execlists) {
> > > + idle &= list_empty(&ring->execlist_queue);
> > > + intel_execlists_retire_requests(ring);
> >
> > This needs to be the other way round I think - we care about idleness after all
> > the currently processed stuff is retired, not before. Otherwise we might
> > notice the busy->idle transition one invocation too late.
> I thought for a while about this. The GPU will be idle when the
> execlist_queues are empty.
> Intel_execlists_retire_requests() cleans up requests which have already
> finished so it is more conservative (in terms of CPU idleness) to check the
> queue beforehand. I thought this would be more desirable than
> potentially reporting idleness early...
> Intel_execlists_retire_requests() can not affect the state of the queue.
> And there is no point checking the execlist_retired_req_list because
> execlists_retire_requests() always empties it.
Ok, I mixed things up without looking ;-)
But that means you acces the execlist_queue, which is also accessed from
irq code, without holding the required locks? This is all a bit confusing
to poor me ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-11-03 16:17 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 9:52 [PATCH 1/4] drm/i915/bdw: Clean up execlist queue items in retire_work Thomas Daniel
2014-10-29 9:52 ` [PATCH 2/4] drm/i915/bdw: Setup global hardware status page in execlists mode Thomas Daniel
2014-11-03 15:47 ` Daniel Vetter
2014-10-29 9:52 ` [PATCH 3/4] drm/i915/bdw: Pin the context backing objects to GGTT on-demand Thomas Daniel
2014-11-03 16:54 ` Daniel Vetter
2014-11-03 17:00 ` Daniel, Thomas
2014-11-03 17:11 ` Daniel Vetter
2014-11-03 21:04 ` Chris Wilson
2014-11-13 10:28 ` [PATCH v5 " Thomas Daniel
2014-11-17 14:38 ` akash goel
2014-11-17 14:55 ` Daniel, Thomas
2014-11-19 17:59 ` Daniel, Thomas
2014-11-17 18:09 ` Daniel Vetter
2014-11-18 9:27 ` Daniel, Thomas
2014-11-18 10:48 ` Daniel, Thomas
2014-11-18 14:33 ` Daniel Vetter
2014-11-18 14:51 ` Daniel, Thomas
2014-11-18 15:11 ` Daniel Vetter
2014-11-18 15:32 ` Daniel, Thomas
2014-11-19 9:53 ` Daniel Vetter
2014-11-18 6:40 ` Deepak S
2014-11-17 14:23 ` Daniel Vetter
2014-11-18 14:27 ` Deepak S
2014-11-24 14:24 ` Daniel Vetter
2014-11-24 17:14 ` Daniel, Thomas
2014-11-24 20:15 ` Daniel Vetter
2014-10-29 9:52 ` [PATCH 4/4] drm/i915/bdw: Pin the ringbuffer backing object " Thomas Daniel
2014-10-29 14:38 ` [PATCH 4/4] drm/i915/bdw: Pin the ringbuffer backing shuang.he
2014-11-13 10:28 ` [PATCH v5 4/4] drm/i915/bdw: Pin the ringbuffer backing object to GGTT on-demand Thomas Daniel
2014-11-18 5:18 ` akash goel
2014-11-18 6:37 ` Deepak S
2014-11-18 6:39 ` Deepak S
2014-11-17 14:29 ` Daniel Vetter
2014-11-18 14:30 ` Deepak S
2014-11-03 15:33 ` [PATCH 1/4] drm/i915/bdw: Clean up execlist queue items in retire_work Daniel Vetter
2014-11-03 16:05 ` Daniel, Thomas
2014-11-03 16:17 ` Daniel Vetter [this message]
2014-11-04 9:11 ` Chris Wilson
2014-11-07 14:55 ` [PATCH v4 " Thomas Daniel
2014-11-13 10:27 ` [PATCH v5 " Thomas Daniel
2014-11-18 6:29 ` Deepak S
2014-11-17 14:41 ` akash goel
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=20141103161728.GD26941@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.daniel@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 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.