intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Retire requests before creating a new one
Date: Fri, 16 May 2014 23:02:44 +0200	[thread overview]
Message-ID: <20140516210244.GX8790@phenom.ffwll.local> (raw)
In-Reply-To: <1400146902-1027-1-git-send-email-chris@chris-wilson.co.uk>

On Thu, May 15, 2014 at 10:41:42AM +0100, Chris Wilson wrote:
> More fallout from
> 
> commit c8725f3dc0911d4354315a65150aecd8b7d0d74a
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Mon Mar 17 12:21:55 2014 +0000
> 
>     drm/i915: Do not call retire_requests from wait_for_rendering
> 
> is that we can completely fill all of memory using small objects, such
> that we exhaust the filp space, and spend all of our time evicting
> objects from the aperture. As such, we never fill the ring, and never
> trigger the last resort flushing in
> 
> commit 1cf0ba14740d96fbf6f58a201f000a34b74f4725
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Mon May 5 09:07:33 2014 +0100
> 
>     drm/i915: Flush request queue when waiting for ring space
> 
> and so all the requests are left active and the objects keep that last
> active reference. Eventually the system comes to a halt as it runs out
> of memory.
> 
> The impact is mainly limited to test cases as regular userspace will
> trigger retirement by manually checking whether an object is active.
> 
> Testcase: igt/gem_lut_handle
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78724
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Tested-by: Guo Jinxian <jinxianx.guo@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 26c9d66e4294..7ba517f1ce06 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -628,6 +628,8 @@ i915_gem_execbuffer_reserve(struct intel_ring_buffer *ring,
>  	bool has_fenced_gpu_access = INTEL_INFO(ring->dev)->gen < 4;
>  	int retry;
>  
> +	i915_gem_retire_requests_ring(ring);
> +
>  	vm = list_first_entry(vmas, struct i915_vma, exec_list)->vm;
>  
>  	INIT_LIST_HEAD(&ordered_vmas);
> -- 
> 2.0.0.rc2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

      reply	other threads:[~2014-05-16 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  9:41 [PATCH] drm/i915: Retire requests before creating a new one Chris Wilson
2014-05-16 21:02 ` 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=20140516210244.GX8790@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --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;
as well as URLs for NNTP newsgroup(s).