All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khatri, Sunil" <sukhatri@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	alexdeucher@gmail.com, Sunil.Khatri@amd.com, Philip.Yang@amd.com,
	Prike.Liang@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/amdgpu: re-order and document VM code
Date: Thu, 11 Sep 2025 19:14:42 +0530	[thread overview]
Message-ID: <138672f5-0868-4d88-b96b-bd55169122fe@amd.com> (raw)
In-Reply-To: <20250911120950.3343-3-christian.koenig@amd.com>

Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Rest later i will try to improve the definition of each list with more 
details for clarity.

On 9/11/2025 5:39 PM, Christian König wrote:
> Re-order fields in the VM structure and try to improve the
> documentation a bit.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 30 ++++++++++++++++++++------
>   1 file changed, 24 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
> index 3409904b5c63..74e61e45778e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
> @@ -349,12 +349,16 @@ struct amdgpu_vm {
>   	/* Memory statistics for this vm, protected by status_lock */
>   	struct amdgpu_mem_stats stats[__AMDGPU_PL_NUM];
>   
> +	/*
> +	 * The following lists contain amdgpu_vm_bo_base objects for either
> +	 * PDs, PTs or per VM BOs. The state transits are:
> +	 *
> +	 * evicted -> relocated (PDs, PTs) or moved (per VM BOs) -> idle
> +	 */
> +
>   	/* Per-VM and PT BOs who needs a validation */
>   	struct list_head	evicted;
>   
> -	/* BOs for user mode queues that need a validation */
> -	struct list_head	evicted_user;
> -
>   	/* PT BOs which relocated and their parent need an update */
>   	struct list_head	relocated;
>   
> @@ -364,15 +368,29 @@ struct amdgpu_vm {
>   	/* All BOs of this VM not currently in the state machine */
>   	struct list_head	idle;
>   
> +	/*
> +	 * The following lists contain amdgpu_vm_bo_base objects for BOs which
> +	 * have their own dma_resv object and not depend on the root PD. Their
> +	 * state transits are:
> +	 *
> +	 * evicted_user or invalidated -> done
> +	 */
> +
> +	/* BOs for user mode queues that need a validation */
> +	struct list_head	evicted_user;
> +
>   	/* regular invalidated BOs, but not yet updated in the PT */
>   	struct list_head	invalidated;
>   
> -	/* BO mappings freed, but not yet updated in the PT */
> -	struct list_head	freed;
> -
>   	/* BOs which are invalidated, has been updated in the PTs */
>   	struct list_head        done;
>   
> +	/*
> +	 * This list contains amdgpu_bo_va_mapping objects which have been freed
> +	 * but not updated in the PTs
> +	 */
> +	struct list_head	freed;
> +
>   	/* contains the page directory */
>   	struct amdgpu_vm_bo_base     root;
>   	struct dma_fence	*last_update;

  reply	other threads:[~2025-09-11 13:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 12:09 [PATCH 1/4] drm/amdgpu: fix userq VM validation v4 Christian König
2025-09-11 12:09 ` [PATCH 2/4] drm/amdgpu: remove check for BO reservation add assert instead Christian König
2025-09-11 12:09 ` [PATCH 3/4] drm/amdgpu: re-order and document VM code Christian König
2025-09-11 13:44   ` Khatri, Sunil [this message]
2025-09-11 12:09 ` [PATCH 4/4] drm/amdgpu: revert to old status lock handling v3 Christian König
2025-09-11 13:47   ` Khatri, Sunil
2025-09-24 21:33   ` Leo Li
2025-09-11 16:24 ` [PATCH 1/4] drm/amdgpu: fix userq VM validation v4 Alex Deucher
2025-09-12  7:47 ` Liang, Prike

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=138672f5-0868-4d88-b96b-bd55169122fe@amd.com \
    --to=sukhatri@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=Prike.Liang@amd.com \
    --cc=Sunil.Khatri@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.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.