[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: fadvise syscall?
Joel Becker wrote:
> On Sun, Mar 17, 2002 at 01:41:37PM +0000, Anton Altaparmakov wrote:
> > We don't need fadvise IMHO. That is what open(2) is for. The streaming
> > request you are asking for is just a normal open(2). It will do read ahead
> > which is perfect for streaming (of data size << RAM size in its current form).
> A quick real world example of where fadvise can work well.
> Imagine a database appliction that doesn't use O_DIRECT (for whatever
> reason, could even be that they don't trust the linux implementation yet
> :-).

O_DIRECT is broken against RAID0 (at least) in 2.5 at present. The
RAID driver gets sent BIOs which straddle two or more chunks and RAID
spits out lots of unpleasant warnings. Neil has been informed...

> So, this database gets a query. That query requires a full table
> scan, so it calls fadvise(fd, F_SEQUENTIAL). Then another query does
> row-specific access, and caching helps. So it wants to turn off

It'd probably be smarter for the application to hold two fds against
the same file for this sort of access pattern.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.140 / U:8.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site