Re: [PATCH v6 14/34] gpu: nova-core: mm: add SharedGpuMm
From: Danilo Krummrich
Date: Fri Dec 04 2026 - 12:45:44 EST
On Wed Dec 2, 2026 at 9:28 AM CET, Alok Kumar wrote:
> +/// A [`GpuMm`] shared between several users, serialized by a mutex.
> +#[pin_data]
> +pub(crate) struct SharedGpuMm<'gpu>
> +where
> + // Hide the mutex's invariant resource lifetime so `SharedGpuMm` remains covariant.
> + exists<'res>: 'gpu,
> +{
> + #[pin]
> + #[uses('res: invariant)]
> + inner: Mutex<GpuMm<'res>>,
> +}
As mentioned previously this will eventually violated DMA fence rules.
Rebasing on latest drm-rust-next, this shouldn't be needed anymore, as I added
more granular locking to the inner fields of GpuMm.