[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72dbd3150904031553r3c60a3a5k45f16e0e7513d488@mail.gmail.com>
Date: Fri, 3 Apr 2009 15:53:18 -0700
From: David Rees <drees76@...il.com>
To: Jeff Garzik <jeff@...zik.org>
Cc: Janne Grunau <j@...nau.net>, Mark Lord <lkml@....ca>,
Lennart Sorensen <lsorense@...lub.uwaterloo.ca>,
Jens Axboe <jens.axboe@...cle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>, tytso@....edu,
jesper@...gh.cc,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 2.6.29
On Fri, Apr 3, 2009 at 2:57 PM, Jeff Garzik <jeff@...zik.org> wrote:
> Just curious, does MythTV need fsync(), or merely to tell the kernel to
> begin asynchronously writing data to storage?
>
> sync_file_range(..., SYNC_FILE_RANGE_WRITE) might be enough, if you do not
> need to actually wait for completion.
>
> This may be the case, if the idea behind MythTV's fsync(2) is simply to
> prevent the kernel from building up a huge amount of dirty pages in the
> pagecache [which, in turn, produces bursty write-out behavior].
The *only* reason MythTV fsyncs (or fdatasyncs) the data to disk all
the time is to keep a large amount of dirty pages from building up and
then causing horrible latencies when that data starts getting flushed
to disk.
A typical example of this would be that MythTV is recording a show in
the background while playing back another show.
When the dirty limit is hit and data gets flushed to disk, this would
keep the read buffer on the player from happening fast enough and then
playback would stutter.
Instead of telling people ext3 sucks - mount it in writeback or use
xfs or tweak your vm knobs, they simply put a hack in there instead
which largely eliminates the effect.
I don't think many people would care too much if they lost 30-60
seconds of their recorded TV show if the system crashes for whatever
reason.
-Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists