[mythtv-users] PVR250 + TVWonder = jerky

michael at optusnet.com.au michael at optusnet.com.au
Thu Jun 5 10:21:13 EDT 2003


Isaac Richards <ijr at po.cwru.edu> writes:
> On Wednesday 04 June 2003 03:20 am, Bruce Markey wrote:
> > Inconclusive. This wrote more "rebuffering (125268 128000)"
> > messages but the "prebuffering..." messages are triggered
> > by high motion. It's hard to tell if they are more common
> > one way or the other.
> >
> > I neglected to ask you if you could uncomment the prebuffer
> > message for when you see the 10ms std dev.
> 
> Ok, does the attached patch help any?
 
It may paper over the problem, but the underlying cause will
still exist.

The basic problem is long standing. That is, RingBuffer::safe_read
doesn't handle the request windowing correctly.

The logic you've currently got there is 

        if there's less than one requests worth of data buffered then
                send off a 'random' number of requests for more blocks.
        munch data and return it.

If the supplier is normally fast (i.e. it's normally reading from
disk, but every now and then runs slow because there's a sync() or
similar) then you'll get infrequent random rebuffering.

The real solution (as I think was mentioned some time ago) is to
count the number of requests outstanding, and ensure that that
number doesn't drop below a given threshold. (i.e. no less
than 5 requests outstanding or some such).

(And no, the the read ahead code doesn't fix this. It just hides the
problem a bit more).

Michael.


More information about the mythtv-users mailing list