Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2001 15:11:02 +0100
From:      Anton Berezin <tobez@tobez.org>
To:        Peter Dufault <dufault@hda.hda.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: how to actually find out whether data hit the disk?
Message-ID:  <20010228151102.C29400@heechee.tobez.org>
In-Reply-To: <200102281357.f1SDvVW27830@hda.hda.com>; from dufault@hda.hda.com on Wed, Feb 28, 2001 at 08:57:31AM -0500
References:  <20010228140749.B29400@heechee.tobez.org> <200102281357.f1SDvVW27830@hda.hda.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 28, 2001 at 08:57:31AM -0500, Peter Dufault wrote:
> > I am doing the following, on the partition with softupdates turned on:
> > 
> > 1. fd = open("a file", O_CREAT)
> > 2. mmap(fd)
> > 3. sequencial write to mmapped region
> > 4. some other processing
> > 5. munmap
> > 6. unlink
> > 7. close
> > 
> > Since this is a supposedly high-perfomance application, I am interested
> > that data do NOT hit the disk.  I understand that softupdates do a good
> > job at that.  The time taken by step 4 is usually sub-second, but
> > sometimes it can take longer (network delays etc.).  The question is -
> > is it possible to actually find out whether data hit the disk or not for
> > a particular run of 1-7?
> 
> Answer to your question:
> 
> Do an msync with MS_SYNC someplace.  Also, use MAP_NOSYNC in
> mmap until 4.3 when Matt Dillon plans to make that the default behavior.

Ahh, no.  That's the other way around - I do not *want* it to hit the
disk, but would like to *know* when it nevertheless does.

=Anton.
-- 
May the tuna salad be with you.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010228151102.C29400>