Subject: Re: lfs panic on NetBSD-4.0_BETA2
To: None <email@example.com>
From: Eric Haszlakiewicz <firstname.lastname@example.org>
Date: 12/19/2006 17:03:51
On Tue, Dec 19, 2006 at 11:49:12PM +0100, Joerg Sonnenberger wrote:
> On Tue, Dec 19, 2006 at 04:47:15PM -0600, Eric Haszlakiewicz wrote:
> > Do you mean that the buggy part of it is that it is calling msync
> > so _often_? This should be no worse than calling fsync() often, right?
> It shouldn't call msync at all as the VM subsystem will write the dirty
> pages back to disk anyway. Leaving it to the VM subsystem has the
> additional advantage of potentially reducing disk fragmentation
> dramatically, esp. during fast downloads.
Sure, for this particular application that sounds like it makes
sense. But, if the app actually has a reason to ensure the data is written
to the disk (e.g. maybe it's a database app) it seems that msync() shouldn't
be any worse than fsync(), and actually it might be better. i.e.
using msync() isn't inherently bad, just over-using it is.