All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Hellstrom Thomas <thomas.hellstrom@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915: Do not use reserved requests for virtual engines
Date: Mon, 27 Jun 2022 10:18:59 -0700	[thread overview]
Message-ID: <20220627171859.GA23032@jons-linux-dev-box> (raw)
In-Reply-To: <20220614184348.23746-4-ramalingam.c@intel.com>

On Wed, Jun 15, 2022 at 12:13:48AM +0530, Ramalingam C wrote:
> Do not use reserved requests for virtual engines as this is only
> needed for kernel contexts.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Suggested-by: Matthew Brost <matthew.brost@intel.com>

With the patch squashed into the previous patch:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_request.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index c71905d8e154..f0392b053bca 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -135,6 +135,8 @@ static void i915_fence_release(struct dma_fence *fence)
>  
>  	/*
>  	 * Keep one request on each engine for reserved use under mempressure
> +	 * do not use with virtual engines as this really is only needed for
> +	 * kernel contexts.
>  	 *
>  	 * We do not hold a reference to the engine here and so have to be
>  	 * very careful in what rq->engine we poke. The virtual engine is
> @@ -164,7 +166,8 @@ static void i915_fence_release(struct dma_fence *fence)
>  	 * know that if the rq->execution_mask is a single bit, rq->engine
>  	 * can be a physical engine with the exact corresponding mask.
>  	 */
> -	if (is_power_of_2(rq->execution_mask) &&
> +	if (!intel_engine_is_virtual(rq->engine) &&
> +	    is_power_of_2(rq->execution_mask) &&
>  	    !cmpxchg(&rq->engine->request_pool, NULL, rq))
>  		return;
>  
> -- 
> 2.20.1
> 

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Brost <matthew.brost@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Hellstrom Thomas <thomas.hellstrom@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/i915: Do not use reserved requests for virtual engines
Date: Mon, 27 Jun 2022 10:18:59 -0700	[thread overview]
Message-ID: <20220627171859.GA23032@jons-linux-dev-box> (raw)
In-Reply-To: <20220614184348.23746-4-ramalingam.c@intel.com>

On Wed, Jun 15, 2022 at 12:13:48AM +0530, Ramalingam C wrote:
> Do not use reserved requests for virtual engines as this is only
> needed for kernel contexts.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Suggested-by: Matthew Brost <matthew.brost@intel.com>

With the patch squashed into the previous patch:
Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_request.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index c71905d8e154..f0392b053bca 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -135,6 +135,8 @@ static void i915_fence_release(struct dma_fence *fence)
>  
>  	/*
>  	 * Keep one request on each engine for reserved use under mempressure
> +	 * do not use with virtual engines as this really is only needed for
> +	 * kernel contexts.
>  	 *
>  	 * We do not hold a reference to the engine here and so have to be
>  	 * very careful in what rq->engine we poke. The virtual engine is
> @@ -164,7 +166,8 @@ static void i915_fence_release(struct dma_fence *fence)
>  	 * know that if the rq->execution_mask is a single bit, rq->engine
>  	 * can be a physical engine with the exact corresponding mask.
>  	 */
> -	if (is_power_of_2(rq->execution_mask) &&
> +	if (!intel_engine_is_virtual(rq->engine) &&
> +	    is_power_of_2(rq->execution_mask) &&
>  	    !cmpxchg(&rq->engine->request_pool, NULL, rq))
>  		return;
>  
> -- 
> 2.20.1
> 

  reply	other threads:[~2022-06-27 17:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 18:43 [Intel-gfx] [PATCH 0/3] Break VM to rq reference loop Ramalingam C
2022-06-14 18:43 ` Ramalingam C
2022-06-14 18:43 ` [Intel-gfx] [PATCH 1/3] drm/i915: Do not access rq->engine without a reference Ramalingam C
2022-06-14 18:43   ` Ramalingam C
2022-06-27 17:09   ` [Intel-gfx] " Matthew Brost
2022-06-27 17:09     ` Matthew Brost
2022-06-14 18:43 ` [Intel-gfx] [PATCH 2/3] Revert "drm/i915: Hold reference to intel_context over life of i915_request" Ramalingam C
2022-06-14 18:43   ` Ramalingam C
2022-06-27 17:18   ` [Intel-gfx] " Matthew Brost
2022-06-27 17:18     ` Matthew Brost
2022-06-14 18:43 ` [Intel-gfx] [PATCH 3/3] drm/i915: Do not use reserved requests for virtual engines Ramalingam C
2022-06-14 18:43   ` Ramalingam C
2022-06-27 17:18   ` Matthew Brost [this message]
2022-06-27 17:18     ` Matthew Brost
2022-06-27 18:01     ` [Intel-gfx] " Ramalingam C
2022-06-27 18:01       ` Ramalingam C
2022-06-14 19:56 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Break VM to rq reference loop Patchwork
2022-06-14 20:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-06-15  6:41 ` [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=20220627171859.GA23032@jons-linux-dev-box \
    --to=matthew.brost@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=ramalingam.c@intel.com \
    --cc=thomas.hellstrom@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.