[lkml]   [2011]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 0/2] fadvise: support POSIX_FADV_NOREUSE
On Tue, Jul 12, 2011 at 3:22 PM, Andrea Righi <> wrote:
> If the file data is not in memory you can't set a bit in any struct
> page. You could even open a file and execute POSIX_FADV_NOREUSE without
> reading any page from the file.

Mmm, too bad.

> I think it would be better to maintain a list of file offset/length
> structures per file descriptor or (as a starting solution) even mark the
> entire file as non-cacheable without considering the ranges.

I recommend against the "whole file" approach. In my application (for
instance), I deal with files in the hundreds of gigabytes. Marking
the whole file non-cacheable, when I was just trying to give a hint
about a few hundred megs, would be a total disaster.

I would suggest implementing it right or leaving it as a no-op. Just my $0.02.

Thanks for working on this. Better support for these page cache hints
will be great to see.

- Pat

 \ /
  Last update: 2011-07-13 02:39    [W:0.042 / U:0.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site