All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH v3 6/6] drm/i915/gt: describe the new tlb parameter at i915_vma_resource
Date: Wed, 27 Jul 2022 16:20:39 +0200	[thread overview]
Message-ID: <YuFJtzTmyRZLwwK7@alfio.lan> (raw)
In-Reply-To: <aa55eef7e63b8f3d0f69b525db2dd2eb87e9db6b.1658924372.git.mchehab@kernel.org>

Hi Mauro,

> TLB cache invalidation can happen on two different situations:
> 
> 1. synchronously, at __vma_put_pages();
> 2. asynchronously.
> 
> On the first case, TLB cache invalidation happens inside
> __vma_put_pages(). So, no need to do it later on.
> 
> However, on the second case, the pages will keep in memory
> until __i915_vma_evict() is called.
> 
> So, we need to store the TLB data at struct i915_vma_resource,
> in order to do a TLB cache invalidation before allowing
> userspace to re-use the same memory.
> 
> So, i915_vma_resource_unbind() has gained a new parameter
> in order to store the TLB data at the second case.
> 
> Document it.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> 
> To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
> See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1658924372.git.mchehab@kernel.org/
> 
>  drivers/gpu/drm/i915/i915_vma_resource.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vma_resource.c b/drivers/gpu/drm/i915/i915_vma_resource.c
> index 5a67995ea5fe..4fe09ea0a825 100644
> --- a/drivers/gpu/drm/i915/i915_vma_resource.c
> +++ b/drivers/gpu/drm/i915/i915_vma_resource.c
> @@ -216,6 +216,10 @@ i915_vma_resource_fence_notify(struct i915_sw_fence *fence,
>  /**
>   * i915_vma_resource_unbind - Unbind a vma resource
>   * @vma_res: The vma resource to unbind.
> + * @tlb: pointer to vma->obj->mm.tlb associated with the resource
> + *	 to be stored at vma_res->tlb. When not-NULL, it will be used
> + *	 to do TLB cache invalidation before freeing a VMA resource.
> + *	 used only for async unbind.

/used/Used/

With that:

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Thanks,
Andi

  reply	other threads:[~2022-07-27 14:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 12:29 [PATCH v3 0/6] drm/i915: reduce TLB performance regressions Mauro Carvalho Chehab
2022-07-27 12:29 ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29 ` Mauro Carvalho Chehab
2022-07-27 12:29 ` [PATCH v3 1/6] drm/i915/gt: Ignore TLB invalidations on idle engines Mauro Carvalho Chehab
2022-07-27 12:29   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29   ` Mauro Carvalho Chehab
2022-07-27 12:29 ` [PATCH v3 2/6] drm/i915/gt: document with_intel_gt_pm_if_awake() Mauro Carvalho Chehab
2022-07-27 12:29   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29   ` Mauro Carvalho Chehab
2022-07-27 14:18   ` [Intel-gfx] " Andi Shyti
2022-07-27 14:18     ` Andi Shyti
2022-07-27 12:29 ` [PATCH v3 3/6] drm/i915/gt: Invalidate TLB of the OA unit at TLB invalidations Mauro Carvalho Chehab
2022-07-27 12:29   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29   ` Mauro Carvalho Chehab
2022-07-27 12:29 ` [PATCH v3 4/6] drm/i915/gt: Skip TLB invalidations once wedged Mauro Carvalho Chehab
2022-07-27 12:29   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29   ` Mauro Carvalho Chehab
2022-07-27 12:29 ` [PATCH v3 5/6] drm/i915/gt: Batch TLB invalidations Mauro Carvalho Chehab
2022-07-27 12:29   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29   ` Mauro Carvalho Chehab
2022-07-27 14:25   ` Andi Shyti
2022-07-27 14:25     ` [Intel-gfx] " Andi Shyti
2022-07-27 14:25     ` Andi Shyti
2022-07-27 12:29 ` [PATCH v3 6/6] drm/i915/gt: describe the new tlb parameter at i915_vma_resource Mauro Carvalho Chehab
2022-07-27 12:29   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-07-27 12:29   ` Mauro Carvalho Chehab
2022-07-27 14:20   ` Andi Shyti [this message]
2022-07-27 13:12 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: reduce TLB performance regressions Patchwork
2022-07-27 13:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-07-27 15:52 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-07-28 12:08 ` [Intel-gfx] [PATCH v3 0/6] " Andi Shyti
2022-07-28 12:08   ` Andi Shyti
2022-07-28 12:08   ` Andi Shyti
2022-07-28 12:34   ` Mauro Carvalho Chehab
2022-07-28 12:34     ` Mauro Carvalho Chehab

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=YuFJtzTmyRZLwwK7@alfio.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rodrigo.vivi@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.