From: Matthew Brost <matthew.brost@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Oded Gabbay <ogabbay@kernel.org>
Subject: Re: [PATCH v2 7/7] drm/xe/bo: Allow eviction of unbound local bos
Date: Fri, 22 Mar 2024 18:52:57 +0000 [thread overview]
Message-ID: <Zf3Tifskoks51r/S@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240322090213.6091-8-thomas.hellstrom@linux.intel.com>
On Fri, Mar 22, 2024 at 10:02:13AM +0100, Thomas Hellström wrote:
> Local bos that don't have any gpu_vmas set up are allowed
> to be evicted. Support that.
>
> Fixes: 24f947d58fe5 ("drm/xe: Use DRM GPUVM helpers for external- and evicted objects")
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Oded Gabbay <ogabbay@kernel.org>
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/xe/xe_bo.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index db4cd1da8ef3..87e6aff52ca6 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -1029,10 +1029,14 @@ static bool xe_bo_eviction_valuable(struct ttm_buffer_object *ttm_bo,
> if (vm && !drm_gpuvm_is_extobj(&vm->gpuvm, &ttm_bo->base) &&
> vm->is_validating) {
> xe_vm_assert_held(vm);
> + /* Not bound to the vm? */
> + if (list_empty(&ttm_bo->base.gpuva.list))
> + goto allow;
> return false;
> }
> }
>
> +allow:
> return ttm_bo_eviction_valuable(ttm_bo, place);
> }
>
> --
> 2.44.0
>
next prev parent reply other threads:[~2024-03-22 18:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 9:02 [PATCH v2 0/7] drm/xe: Rework rebinding and allow same-vm eviction Thomas Hellström
2024-03-22 9:02 ` [PATCH v2 1/7] drm/xe: Use ring ops TLB invalidation for rebinds Thomas Hellström
2024-03-22 17:47 ` Matthew Brost
2024-03-22 9:02 ` [PATCH v2 2/7] drm/xe: Rework rebinding Thomas Hellström
2024-03-22 9:02 ` [PATCH v2 3/7] drm/xe: Make TLB invalidation fences unordered Thomas Hellström
2024-03-22 18:00 ` Matthew Brost
2024-03-22 9:02 ` [PATCH v2 4/7] drm/xe: Reserve fences where needed Thomas Hellström
2024-03-22 18:28 ` Matthew Brost
2024-03-22 9:02 ` [PATCH v2 5/7] drm/xe: Move vma rebinding to the drm_exec locking loop Thomas Hellström
2024-03-22 18:30 ` Matthew Brost
2024-03-22 9:02 ` [PATCH v2 6/7] drm/xe/bo: Forward the decision to evict local objects during validation Thomas Hellström
2024-03-22 18:51 ` Matthew Brost
2024-03-22 9:02 ` [PATCH v2 7/7] drm/xe/bo: Allow eviction of unbound local bos Thomas Hellström
2024-03-22 18:52 ` Matthew Brost [this message]
2024-03-22 9:16 ` ✓ CI.Patch_applied: success for drm/xe: Rework rebinding and allow same-vm eviction (rev2) Patchwork
2024-03-22 9:16 ` ✓ CI.checkpatch: " Patchwork
2024-03-22 9:17 ` ✓ CI.KUnit: " Patchwork
2024-03-22 9:28 ` ✓ CI.Build: " Patchwork
2024-03-22 9:30 ` ✓ CI.Hooks: " Patchwork
2024-03-22 9:32 ` ✓ CI.checksparse: " Patchwork
2024-03-22 10:06 ` ✓ CI.BAT: " 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=Zf3Tifskoks51r/S@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=ogabbay@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=thomas.hellstrom@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox