Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Add debug messages for MMU notifier and VMA invalidate
Date: Thu, 21 Mar 2024 14:20:35 +0100	[thread overview]
Message-ID: <918da0c9-bdde-40be-a184-822ddfbea0ae@linux.intel.com> (raw)
In-Reply-To: <20240320194232.1910688-1-matthew.brost@intel.com>


On 3/20/2024 8:42 PM, Matthew Brost wrote:
> Extra debug is useful when working on VM issues.
>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>

  print_op() can be expanded to handle this but may be in a separate patch.

Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>

> ---
>   drivers/gpu/drm/xe/xe_vm.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 80d43d75b1da..e3692b7e1711 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -648,6 +648,10 @@ static bool vma_userptr_invalidate(struct mmu_interval_notifier *mni,
>   	if (!mmu_notifier_range_blockable(range))
>   		return false;
>   
> +	vm_dbg(&xe_vma_vm(vma)->xe->drm,
> +	       "NOTIFIER: addr=0x%016llx, range=0x%016llx",
> +		xe_vma_start(vma), xe_vma_size(vma));
> +
>   	down_write(&vm->userptr.notifier_lock);
>   	mmu_interval_set_seq(mni, cur_seq);
>   
> @@ -3233,6 +3237,10 @@ int xe_vm_invalidate_vma(struct xe_vma *vma)
>   	xe_assert(xe, !xe_vma_is_null(vma));
>   	trace_xe_vma_invalidate(vma);
>   
> +	vm_dbg(&xe_vma_vm(vma)->xe->drm,
> +	       "INVALIDATE: addr=0x%016llx, range=0x%016llx",
> +		xe_vma_start(vma), xe_vma_size(vma));
> +
>   	/* Check that we don't race with page-table updates */
>   	if (IS_ENABLED(CONFIG_PROVE_LOCKING)) {
>   		if (xe_vma_is_userptr(vma)) {

      parent reply	other threads:[~2024-03-21 13:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 19:42 [PATCH] drm/xe: Add debug messages for MMU notifier and VMA invalidate Matthew Brost
2024-03-20 19:46 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-20 19:47 ` ✓ CI.checkpatch: " Patchwork
2024-03-20 19:47 ` ✓ CI.KUnit: " Patchwork
2024-03-20 20:02 ` ✓ CI.Build: " Patchwork
2024-03-20 20:06 ` ✓ CI.Hooks: " Patchwork
2024-03-20 20:08 ` ✓ CI.checksparse: " Patchwork
2024-03-20 20:30 ` ✓ CI.BAT: " Patchwork
2024-03-21 13:20 ` Nirmoy Das [this message]

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=918da0c9-bdde-40be-a184-822ddfbea0ae@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@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