Re: [PATCH RFC v6 05/26] nova-core: mm: Add support to use PRAMIN windows to write to VRAM

Danilo Krummrich
2026-01-29T00:09:35Z

On Wed Jan 28, 2026 at 4:27 PM CET, Joel Fernandes wrote:
> I will go over these concerns, just to clarify - do you mean forbidding
> *any* lock or do you mean only forbidding non-atomic locks? I believe we
> can avoid non-atomic locks completely - actually I just wrote a patch
> before I read this email to do just. If we are to forbid any locking at
> all, that might require some careful redesign to handle the above race
> afaics.

It's not about the locks themselves, sleeping locks are fine too. It's about
holding locks that are held elsewhere when doing memory allocations that can
call back into MMU notifiers or the shrinker.

I.e. if in the fence signalling critical path you wait for a mutex that is held
elsewhere while allocating memory and the memory allocation calls back into the
shrinker, you may end up waiting for your own DMA fence to be signaled, which
causes a deadlock.