pvr250 and MythTV

John-Mark Gurney gurney_j at resnet.uoregon.edu
Mon Feb 26 05:17:34 UTC 2007


Greg 'groggy' Lehey wrote this message on Mon, Feb 26, 2007 at 14:29 +1030:
> > I've tried this with a PVR 250.  It panics out of cxm_read with a call
> > to msleep holding a mutex (IIRC).  I'm having difficulty getting a
> > dump of this machine, so it may take a little longer to localize.
> 
> OK, the reason for the dump was a non-intuitive requirement of
> msleep(): if you want to sleep forever, you need to be holding a
> mutex.  I'm trying to clarify the reasons for this, but for the moment
> the following patch works around the "feature":

[...]

> Why has nobody else seen this?  It only happens if you set the
> INVARIANTS option in the kernel build.
> 
> I have some other minor issues, but on the whole things seem to work
> in my environment (PVR 250, Pentium, 6.2-STABLE).

This is because w/o holding a lock, you cannot guarantee that you did
not miss your wakeup, and so, you could deadlock the kernel if you
slept forever (and was never woken up)...  If you were holding Giant,
it would be ok for a zero timo...  msleep(9) documents this behavior..

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-multimedia mailing list