Re: Linux 2.6.29

Jeff Garzik
2009-04-03T19:58:36Z

Mark Lord wrote:
> Lennart Sorensen wrote:
>>
>> Well the system is setup like this:
>>
>> Core 2 Quad Q6600 CPU (2.4GHz quad core).
>> Asus P5K mainboard (Intel P35 chipset)
>> 6GB of ram
>> PVR500 dual NTSC tuner pci card
> ..
>> So the behaviour with cfq is:
>> Disk light seems to be constantly on if there is any disk activity.
>> iotop
>> can show a total io of maybe 1MB/s and the disk light is on constantly.
> ..
>
> Lennart,
>
> I wonder if the problem with your system is really a Myth/driver issue?
>
> Curiously, I have a HVR-1600 card here, and when recording analog TV with
> it the disk lights are on constantly. The problem with it turns out to
> be mythbackend doing fsync() calls ten times a second.
>
> My other tuner cards don't have this problem.
>
> So perhaps the PVR-500 triggers the same buggy behaviour as the HVR-1600?
> To work around it here, I decided to use a preload library that replaces
> the frequent fsync() calls with a more moderated behaviour:
>
> http://rtr.ca/hvr1600/libfsync.tar.gz
>
> Grab that file and try it out. Instructions are included within.
> Report back again and let us know if it makes any difference.
>
> Someday I may try and chase down the exact bug that causes mythbackend
> to go fsyncing berserk like that, but for now this workaround is fine.

mythtv/libs/libmythtv/ThreadedFileWriter.cpp is a good place to start
(Sync method... uses fdatasync if available, fsync if not).

mythtv is definitely a candidate for sync_file_range() style output, IMO.

Jeff