Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2012 14:56:55 -0800
From:      Julian Elischer <julian@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org, Tijl Coosemans <tijl@coosemans.org>
Subject:   Re: posix_fadvise noreuse disables file caching
Message-ID:  <4F2088B7.7030308@freebsd.org>
In-Reply-To: <201201251129.22368.jhb@freebsd.org>
References:  <201201191739.48327.tijl@coosemans.org>	<201201201412.13269.jhb@freebsd.org> <201201251129.22368.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/25/12 8:29 AM, John Baldwin wrote:
>
> So I've came up with this untested patch.  It uses
> VOP_ADVISE(FADV_DONTNEED) after read(2) calls to a NOREUSE region, and
> leaves read-ahead caching enabled for NOREUSE.  FADV_DONTNEED doesn't
> do any good really for writes (it only flushes clean buffers), so I've
> left write(2) operations as using IO_DIRECT still.  Does this sound
> reasonable?

That sounds like a good solution. If people want something from write they
can do it separately. For what it's worth, I would expect NOREUSE on 
write to still do
write clustering but to free the buffer once it is written.




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