Hi, On Wed, Nov 5, 2025 at 11:50 PM Danilo Krummrich <[email protected]> wrote: > > On 11/4/25 12:53 AM, Mohamed Ahmed wrote: > > Thanks a lot for the shout out! Looking more at things, the logic here > > is actually redundant. It was originally copied over directly from the > > bo allocation code to stay on the safer side (basically the idea back > > then was to make both the bo and vmm sides match exactly). We aren't > > at risk of having an aligned address that is in the wrong memory type > > because the bo allocation code (nouveau_bo.c:321) forces anything that > > has the GART flag to have a page size of 4K. Anything getting a page > > size higher than that is exclusively VRAM only. Additionally, > > currently things marked VRAM only don't get evicted to host memory > > except under high memory pressure and in that case, the context is > > paused until the objects in question are paged back in, so we also > > don't have to worry about memory placement there. > > > > The memory placement check in the vmm code could be removed but I am > > leaning more towards leaving it as is just to stay on the safer side. > > If it is not necessary, please remove it. We should not carry dead code. >
For correctness, this code path needs to refuse incompatible domains to decide the appropriate page size. As such those checks should remain. Regards, Mary
