Re: [PATCH] drm/panthor: Check VMA boundaries for PMD mappings

From: Boris Brezillon

Date: Tue Jun 23 2026 - 16:46:09 EST


On Tue, 23 Jun 2026 22:03:41 +0200
Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote:

> Anyway, I'll try to get back to this map_pages() implementation, and
> see how we can handle the fallback when locks can't be acquired in that
> path (I assume this would mean no PMD mapping in the fallback path if
> we get rid of huge_fault()).

More on that. I had a brief look at map_pages()/fault_around(), and it
seems it's only meant to populate PTE entries, not PMDs. Part of the
perf boost we were looking for when adding huge_fault() was limiting
the number of faults when adjacent pages are touched, but the other
part was limiting the page table depth to optimize page-table walks, so
if we're implementing map_pages() without huge_fault(), we basically
lose the second part of the optimization. I'd need to check how much
perf we leave on the table with that.