All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Remove the global cache shrink & rcu barrier on allocation failure
Date: Fri, 5 Oct 2018 09:39:45 +0100	[thread overview]
Message-ID: <2b21e0ca-5a90-71ff-8d62-8cd3901988c0@linux.intel.com> (raw)
In-Reply-To: <20181005080300.9908-2-chris@chris-wilson.co.uk>


On 05/10/2018 09:03, Chris Wilson wrote:
> Earlier, we reasoned that having idled the gpu under mempressure, that
> would be a good time to trim our request slabs in order to perform the
> next request allocation. We have stopped performing the global operation
> on the device (no idling) and wish to make the allocation failure
> handling more local, so out with the global barrier that may take a long
> time.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_request.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index 32bf2c9868bf..c5e40e5f0e65 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -657,17 +657,6 @@ i915_request_alloc(struct intel_engine_cs *engine, struct i915_gem_context *ctx)
>   		if (rq)
>   			cond_synchronize_rcu(rq->rcustate);
>   
> -		/*
> -		 * We've forced the client to stall and catch up with whatever
> -		 * backlog there might have been. As we are assuming that we
> -		 * caused the mempressure, now is an opportune time to
> -		 * recover as much memory from the request pool as is possible.
> -		 * Having already penalized the client to stall, we spend
> -		 * a little extra time to re-optimise page allocation.
> -		 */
> -		kmem_cache_shrink(i915->requests);
> -		rcu_barrier(); /* Recover the TYPESAFE_BY_RCU pages */
> -
>   		rq = kmem_cache_alloc(i915->requests, GFP_KERNEL);
>   		if (!rq) {
>   			ret = -ENOMEM;
> 

Wish I was in space...
.
.
.
.
...so no one could hear me scream! :))

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

  reply	other threads:[~2018-10-05  8:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05  8:02 [PATCH 1/2] drm/i915: Warn if request allocation stalls Chris Wilson
2018-10-05  8:03 ` [PATCH 2/2] drm/i915: Remove the global cache shrink & rcu barrier on allocation failure Chris Wilson
2018-10-05  8:39   ` Tvrtko Ursulin [this message]
2018-10-05  9:16     ` Chris Wilson
2018-10-05  8:37 ` [PATCH 1/2] drm/i915: Warn if request allocation stalls Tvrtko Ursulin
2018-10-05  9:31   ` Chris Wilson
2018-10-05  8:50 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2018-10-05 11:17 ` ✓ Fi.CI.IGT: " 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=2b21e0ca-5a90-71ff-8d62-8cd3901988c0@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --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 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.