All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 6/8] drm/i915: Only retire requests when eviction is allowed to blocked
Date: Mon,  6 Jan 2020 10:22:25 +0000	[thread overview]
Message-ID: <20200106102227.2438478-6-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20200106102227.2438478-1-chris@chris-wilson.co.uk>

We want to keep the PIN_NONBLOCK search quick, avoiding evicting
recently active nodes. To that end, skip performing the more laborious
retirement prior to beginning the fast search.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_evict.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index 0697bedebeef..5f8b6cc55195 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -124,7 +124,8 @@ i915_gem_evict_something(struct i915_address_space *vm,
 				    min_size, alignment, color,
 				    start, end, mode);
 
-	intel_gt_retire_requests(vm->gt);
+	if (!(flags & PIN_NONBLOCK))
+		intel_gt_retire_requests(vm->gt);
 
 search_again:
 	active = NULL;
@@ -270,7 +271,8 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,
 	 * a stray pin (preventing eviction) that can only be resolved by
 	 * retiring.
 	 */
-	intel_gt_retire_requests(vm->gt);
+	if (!(flags & PIN_NONBLOCK))
+		intel_gt_retire_requests(vm->gt);
 
 	if (i915_vm_has_cache_coloring(vm)) {
 		/* Expand search to cover neighbouring guard pages (or lack!) */
-- 
2.25.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-01-06 10:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 10:22 [Intel-gfx] [PATCH 1/8] drm/i915/selftests: Fixup sparse __user annotation on local var Chris Wilson
2020-01-06 10:22 ` [Intel-gfx] [PATCH 2/8] drm/i915/selftests: Impose a timeout for request submission Chris Wilson
2020-01-06 10:22 ` [Intel-gfx] [PATCH 3/8] drm/i915/gt: Convert the final GEM_TRACE to GT_TRACE and co Chris Wilson
2020-01-06 10:22 ` [Intel-gfx] [PATCH 4/8] drm/i915: Merge i915_request.flags with i915_request.fence.flags Chris Wilson
2020-01-06 10:22 ` [Intel-gfx] [PATCH 5/8] drm/i915: Replace vma parking with a clock aging algorithm Chris Wilson
2020-01-06 10:22 ` Chris Wilson [this message]
2020-01-06 10:22 ` [Intel-gfx] [PATCH 7/8] drm/i915/gt: Drop mutex serialisation between context pin/unpin Chris Wilson
2020-01-06 11:22   ` Maarten Lankhorst
2020-01-06 10:22 ` [Intel-gfx] [PATCH 8/8] drm/i915/gt: Use memset_p to clear the ports Chris Wilson
2020-01-06 10:31 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/8] drm/i915/selftests: Fixup sparse __user annotation on local var Patchwork
2020-01-06 10:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-01-06 10:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-06 13:00 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=20200106102227.2438478-6-chris@chris-wilson.co.uk \
    --to=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 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.