[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux 2.6.29
On Thu, 2 Apr 2009 09:29:59 -0700 David Rees <> wrote:

> On Thu, Apr 2, 2009 at 4:05 AM, Janne Grunau <> wrote:
> >> Current kernels just have too much IO latency
> >> with ext3 it seems.
> >
> > MythTV calls fsync every few seconds on ongoing recordings to prevent
> > stalls due to large cache writebacks on ext3.
> Personally that is also one of my MythTV pet peeves. A hack added to
> MythTV to work around a crappy ext3 latency bug that also causes these
> large files to get heavily fragmented. That and the fact that yo have
> to patch MythTV to eliminate those forced fdatasyncs - there is no
> knob to turn it off if you're running MythTV on a filesystem which
> doesn't suffer from ext3's data=ordered fsync stalls.

For any filesystem it is quite sensible for an application to manage
the amount of dirty memory which the kernel is holding on its behalf,
and based upon the application's knowledge of its future access

But MythTV did it the wrong way.

A suitable design for the streaming might be, every 4MB:

- run sync_file_range(SYNC_FILE_RANGE_WRITE) to get the 4MB underway
to the disk

- run fadvise(POSIX_FADV_DONTNEED) against the previous 4MB to
discard it from pagecache.

 \ /
  Last update: 2009-04-02 18:51    [W:0.449 / U:1.548 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site