Re: [PATCH v4] io: add io_pgtable abstraction
From: Jason Gunthorpe
Date: Fri Dec 19 2025 - 10:14:38 EST
On Fri, Dec 19, 2025 at 04:11:53PM +0100, Boris Brezillon wrote:
> There's actually a confusion between TLB invalidation and L1/L2 cache
> flush/invalidation. The things we can decide to flush/invalidate around
> map/unmap ops are L1/L2 caches. The TLB invalidate, we don't have
> direct control on: it happens as part of the LOCK+UNLOCK sequence, and
> no matter what you execute (map or unmap), you have to surround it with
> a LOCK/UNLOCK to provide support for atomic updates (GPU is blocked if
> anything accesses the locked range while an update is on-going).
That makes more sense, so these GPU drivers just flush the entire TLB
every time they change it - built into the UNLOCK operation?
Sounds slow, but is a reasonable explanation why they don't use the
callbacks.
Jason