[mythtv-users] Playback problem -- random short pauses

Daniel Kristjansson danielk at cuymedia.net
Mon May 23 19:06:06 UTC 2011


On Mon, 2011-05-23 at 10:51 -0400, Steven Adeff wrote:
> On Mon, May 23, 2011 at 9:41 AM, Mark Lord <mythtv at rtr.ca> wrote:
> > What I would look for in the code, are sync(), fsync(),
> > and fdatasync() calls.  Those generally force writes to happen
> > and pause a lot of stuff to wait for them to complete in real-time.
> >
> > Which can lead to tiny pauses and glitches elsewhere.
> >
> > So just as a trial, perhaps grep through the code looking for those,
> > and temporarily remove them, to see if the problem then goes away.
> > That should prove/disprove this theory.
> 
> my concern with this is other detrimental effects that just removing
> those calls would cause? I just don't know enough about programming to
> make this change in a way that would be useful for troubleshooting.
> 

Removing the fsync() call can lead to pauses, in the unlikely event that
it is being called on a Linux system. The fdatasync() and range syncs
are mostly no-ops since we're appending to a file, so removing those
will have no effect. The main reason the fsync() was added was to
prevent pauses on when the disk I/O scheduler decided to finally write
hundreds of megabytes of data to disk in one long write and consequently
starve all readers and so stop video playback. This was accidentally
subverted when the fdatasync() code was added. But that change happened
over five years ago so if you are seeing a regression with 0.24, fsync()
changes are not to blame.

--
Daniel



More information about the mythtv-users mailing list