RE: [PATCH v5 4/8] vfio: Wait for dma-buf invalidation to complete
From: Tian, Kevin
Date: Thu Jan 29 2026 - 22:12:54 EST
> From: Jason Gunthorpe <jgg@xxxxxxxx>
> Sent: Thursday, January 29, 2026 10:59 PM
>
> On Thu, Jan 29, 2026 at 07:06:37AM +0000, Tian, Kevin wrote:
> > Bear me if it's an ignorant question.
> >
> > The commit msg of patch6 says that VFIO doesn't tolerate unbounded
> > wait, which is the reason behind the 2nd timeout wait here.
>
> As far as I understand dmabuf design a fence wait should complete
> eventually under kernel control, because these sleeps are
> sprinkled all around the kernel today.
>
> I suspect that is not actually true for every HW, probably something
> like "shader programs can run forever technically".
>
> We can argue if those cases should not report revocable either, but at
> least this will work "correctly" even if it takes a huge amount of
> time.
good to know those background.
>
> I wouldn't mind seeing a shorter timeout and print on the fence too
> just in case.
>
either way is OK. It's not difficult to figure out a long wait anyway. 😊