Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2014 23:10:49 +0400
From:      Dmitry Sivachenko <trtrmitya@gmail.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org, Ian Lepore <ian@freebsd.org>, =?iso-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
Subject:   Re: madvise() vs posix_fadvise()
Message-ID:  <2CB392D0-5198-41EB-8191-8B02FE432334@gmail.com>
In-Reply-To: <201404031230.40380.jhb@freebsd.org>
References:  <D6BD48AF-9522-495D-8D54-37854E53C272@gmail.com> <201404031102.38598.jhb@freebsd.org> <1396539837.81853.278.camel@revolution.hippie.lan> <201404031230.40380.jhb@freebsd.org>

index | next in thread | previous in thread | raw e-mail


On 03 Сав. 2014 Ч., at 20:30, John Baldwin <jhb@FreeBSD.org> wrote:

> 
> The latter.  It's sort of like a lazy O_DIRECT.  Each time you call write(2),
> it tries to move any clean pages from your current sequentially written
> stream from inactive to cache, so the pages won't move until a subsequent
> write(2) after bufdaemon or the syncer actually forces them to be written.
> Unfortunately, it is currently implemented by doing an internal
> FADV_DONTNEED after each read() or write().  It would be better if it was
> implemented as a callback when buffers are completed.



Sounds like FADV_NOREUSE should be befeficial for any log-writing program? (syslogd, apache, nginx, .....)

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2CB392D0-5198-41EB-8191-8B02FE432334>