mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: "Danilo Krummrich" <dakr@kernel.org>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	 Boris Brezillon <boris.brezillon@collabora.com>,
	Steven Price <steven.price@arm.com>,
	 Daniel Almeida <daniel.almeida@collabora.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	 dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	 rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v4 0/2] Defer vm_bo cleanup in GPUVM with DRM_GPUVM_IMMEDIATE_MODE
Date: Mon, 20 Oct 2025 11:31:45 +0000	[thread overview]
Message-ID: <aPYdoU-Fey8hBqJ_@google.com> (raw)
In-Reply-To: <20251006-vmbo-defer-v4-0-30cbd2c05adb@google.com>

On Mon, Oct 06, 2025 at 12:05:54PM +0000, Alice Ryhl wrote:
> There are two main ways that GPUVM might be used:
> 
> * staged mode, where VM_BIND ioctls update the GPUVM immediately so that
>   the GPUVM reflects the state of the VM *including* staged changes that
>   are not yet applied to the GPU's virtual address space.
> * immediate mode, where the GPUVM state is updated during run_job(),
>   i.e., in the DMA fence signalling critical path, to ensure that the
>   GPUVM and the GPU's virtual address space has the same state at all
>   times.
> 
> Currently, only Panthor uses GPUVM in immediate mode, but the Rust
> drivers Tyr and Nova will also use GPUVM in immediate mode, so it is
> worth to support both staged and immediate mode well in GPUVM. To use
> immediate mode, we must manage the vm_bos and vas during the fence
> signalling critical path.
> 
> The first part of that work was the introduction of a fence signalling
> safe mutex for the GEMs GPUVA list in commit e7fa80e2932c ("drm_gem: add
> mutex to drm_gem_object.gpuva").
> 
> This is series the second part of that work: Dropping a vm_bo object in
> the fence signalling critical path is problematic for two reasons:
> 
> * When using DRM_GPUVM_RESV_PROTECTED, you cannot remove the vm_bo from
>   the extobj/evicted lists during the fence signalling path.
> * Dropping a vm_bo could lead to the GEM object getting destroyed.
>   The requirement that GEM object cleanup is fence signalling safe is
>   dubious and likely to be violated in practice.
> 
> Panthor already has its own custom implementation of postponing vm_bo
> cleanup. Take inspiration from that by moving the logic into GPUVM, and
> adjust Panthor to use the new GPUVM logic.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

Pushed to drm-rust-next.

I added this to drm-rust instead of drm-misc as a prerequisite for
another patch. If merge conflicts show up, we can do a backmerge.

      parent reply	other threads:[~2025-10-20 11:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06 12:05 Alice Ryhl
2025-10-06 12:05 ` [PATCH v4 1/2] drm/gpuvm: add deferred vm_bo cleanup Alice Ryhl
2025-10-06 12:05 ` [PATCH v4 2/2] panthor: use drm_gpuva_unlink_defer() Alice Ryhl
2025-10-20 11:31 ` Alice Ryhl [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=aPYdoU-Fey8hBqJ_@google.com \
    --to=aliceryhl@google.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®