Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: intel-xe@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/7] drm/xe: Use ring ops TLB invalidation for rebinds
Date: Thu, 21 Mar 2024 22:55:27 +0100	[thread overview]
Message-ID: <2cb0fc2cb7d1588ed611e632785ca7f9dd1afc41.camel@linux.intel.com> (raw)
In-Reply-To: <ZfyF7kfCE+xcMFa7@DUT025-TGLU.fm.intel.com>

On Thu, 2024-03-21 at 19:09 +0000, Matthew Brost wrote:
> 
> 
> Can we simplify this too?
> 
> 	if (vm && (vm->batch_invalidate_tlb || (vm->tlb_flush_seqno
> != q->tlb_flush_seqno))) {
> 		q->tlb_flush_seqno = vm->tlb_flush_seqno;
> 		job->ring_ops_flush_tlb = true;
> 	}
> 
> I think this works as xe_sched_job_is_migration has
> emit_migration_job_gen12 which doesn't look at job-
> >ring_ops_flush_tlb,
> so no need to xe_sched_job_is_migration.
> 
> Also no need to check xe_vm_in_lr_mode as we wouldn'y increment the
> seqno above if that true.
> 
> Lastly, harmless to increment q->tlb_flush_seqno in the case of
> batch_invalidate_tlb being true.

I think I can simplify it a bit. Problem is that neither the migration
vm nor lr mode grabs the vm->resv at arm time so we would access the
seqnos unlocked and potentially get caught by clever static analyzers.

I actually had an assert for that at one point. I should probably re-
add it.

/Thomas


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

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 11:37 [PATCH 0/7] drm/xe: Rework rebinding and allow same-vm eviction Thomas Hellström
2024-03-21 11:37 ` [PATCH 1/7] drm/xe: Make TLB invalidation fences unordered Thomas Hellström
2024-03-21 11:37 ` [PATCH 1/7] drm/xe: Use ring ops TLB invalidation for rebinds Thomas Hellström
2024-03-21 19:09   ` Matthew Brost
2024-03-21 21:14     ` Thomas Hellström
2024-03-21 21:21       ` Thomas Hellström
2024-03-22  2:36         ` Matthew Brost
2024-03-21 21:55     ` Thomas Hellström [this message]
2024-03-21 11:37 ` [PATCH 2/7] drm/xe: Rework rebinding Thomas Hellström
2024-03-21 19:14   ` Matthew Brost
2024-03-21 21:16     ` Thomas Hellström
2024-03-21 11:37 ` [PATCH 2/7] drm/xe: Use ring ops TLB invalidation for rebinds Thomas Hellström
2024-03-21 11:37 ` [PATCH 3/7] drm/xe: Make TLB invalidation fences unordered Thomas Hellström
2024-03-22 17:55   ` Matthew Brost
2024-03-21 11:37 ` [PATCH 3/7] drm/xe: Reserve fences where needed Thomas Hellström
2024-03-21 20:10   ` Matthew Brost
2024-03-21 21:34     ` Thomas Hellström
2024-03-21 11:37 ` [PATCH 4/7] " Thomas Hellström
2024-03-21 11:37 ` [PATCH 4/7] drm/xe: Rework rebinding Thomas Hellström
2024-03-21 11:37 ` [PATCH 5/7] drm/xe: Move vma rebinding to the drm_exec locking loop Thomas Hellström
2024-03-21 11:37 ` [PATCH 6/7] drm/xe/bo: Forward the decision to evict local objects during validation Thomas Hellström
2024-03-21 11:37 ` [PATCH 7/7] drm/xe/bo: Allow eviction of unbound local bos Thomas Hellström
2024-03-21 13:44 ` ✗ CI.Patch_applied: failure for drm/xe: Rework rebinding and allow same-vm eviction 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=2cb0fc2cb7d1588ed611e632785ca7f9dd1afc41.camel@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=stable@vger.kernel.org \
    /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