This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Severe problem with formatted write


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]