On 13/01/20(Mon) 13:35, Mark Kettenis wrote:
> > Date: Mon, 13 Jan 2020 13:20:45 +0100
> > From: Martin Pieuchot <[email protected]>
> >
> > vdsp(4) uses a workaround to not block forever in case the hypervisor
> > doesn't generate an interrupt. The current behavior is to wait the
> > smallest possible interval: one tick.
>
> The hypervisor is known not to generate an interrupt.
>
> > Since this is a documented workaround the value doesn't matter much, so
> > convert the driver to tsleep_nsec(9) with a conservative value. This
> > value could be reduced later on.
> >
> > Ok?
>
> Please, make this 10ms; that is what we have now and 100ms would
> defenitely be too long.
Sure, updated diff below.
Index: arch/sparc64/dev/vdsp.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc64/dev/vdsp.c,v
retrieving revision 1.46
diff -u -p -r1.46 vdsp.c
--- arch/sparc64/dev/vdsp.c 6 Oct 2019 16:24:14 -0000 1.46
+++ arch/sparc64/dev/vdsp.c 13 Jan 2020 13:01:34 -0000
@@ -894,7 +894,8 @@ vdsp_sendmsg(struct vdsp_softc *sc, void
* we specify a timeout such that we don't
* block forever.
*/
- err = tsleep(lc->lc_txq, PWAIT, "vdsp", 1);
+ err = tsleep_nsec(lc->lc_txq, PWAIT, "vdsp",
+ MSEC_TO_NSEC(10));
}
} while (dowait && err == EWOULDBLOCK);
}