Severe problem with formatted write
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Aug 1 22:15:00 GMT 2005
On Tue, Aug 02, 2005 at 12:14:23AM +0300, Janne Blomqvist wrote:
> On Mon, Aug 01, 2005 at 12:45:07PM -0700, Steve Kargl wrote:
> > Is RH9 using a mmap file? This could be strange interaction
> > between mmap and truncating a file. The FreeBSD manual page
> > has the following:
> >
> > WARNING! Extending a file with ftruncate(2), thus creating a big hole,
> > and then filling the hole by modifying a shared mmap() can lead to severe
> > file fragmentation. In order to avoid such fragmentation you should
> > always pre-allocate the file's backing store by write()ing zero's into
> > the newly extended area prior to modifying the area via your mmap().
> > The fragmentation problem is especially sensitive to MAP_NOSYNC pages,
> > because pages may be flushed to disk in a totally random order.
>
> Sorry if I sound rude, but uh, why again are we bothering with mmap?
You're not being rude. FWIW, I agree with your assessment, and
I think we should disable the use of mmap at the moment.
(Janne's mmap points deleted.)
> PS: Thanks Steve for reviewing my FLUSH patch, and sorry for
> forgetting to mention the IOMSG issue.
Don't get discouraged. I'm still working on/with the
patch. Time is very limited at the moment. The only
problems I've seen so far are formatting issues, which
I can easily fix.
--
Steve
More information about the Fortran
mailing list