[lkml]   [2005]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][RESEND] don't allow sys_readahead() on files opened with O_DIRECT
Andrew Morton schrieb:
> a) It doesn't hurt, it's just a bit of a silly thing to do.

IMO it may hurt the performance.

> b) posix_fadvise(POSIX_FADV_WILLNEED) should get the same treatment (and
> it's the preferred way of doing readahead).

Yes, of course.

> c) O_DIRECT fd's should, as much as possible, offer the same ABI as
> buffered fd's.

Hmm, with XIP fd's we agreed on the following behavior: fadvise() and
madvise() just return without reading anything to the page cache. Since
XIP fd's are similar to O_DIRECT fd's their behavior should be similar,
too. If we don't honor the advises we might also ignore the syscall. At
least redhat's readahead is using them.

Maybe we should agree on one behavior that makes sense. And I don't see
any point in filling the page cache when it is not needed.

> d) The patch could break existing apps.

Since it could break applications that are already (some kind of) broken
that shouldn't be a problem.

So you think it is better to read nothing to the page cache and return
zero instead? This seems like "lying" to the user-space :)
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-08-25 14:22    [W:0.056 / U:1.940 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site