linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* O_DIRECT
@ 2004-12-02  1:01 Steve French
  0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2004-12-02  1:01 UTC (permalink / raw)
  To: linux-fsdevel

Is there a precise defintion of the Linux O_DIRECT  semantics, in 
particularly addressing desired behavior in the cases of:
1) inodes opened more than once (some with and some without O_DIRECT) - 
do the other open file instances get disabled caching?
2) consistency of mmap data and sendfile data (how could this work 
without write through of the page cache?) when inode is opened O_DIRECT

If the goal of O_DIRECT is not only to bypass the local client's page 
cache, but also to bypass the 4K read/write page size (and allow larger 
read, writes), is it acceptable for an fs to handle files opened 
O_DIRECT to disable caching by turning off calls to generic_file_read 
and generic_file_write for reads and writes to that inode (after a 
sync)?  If not, is there a conventional "no cache" mount option used by 
other filesystems to do the equivalent on a mounted volume?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: O_DIRECT
@ 2004-12-02  2:50 Lever, Charles
  0 siblings, 0 replies; 2+ messages in thread
From: Lever, Charles @ 2004-12-02  2:50 UTC (permalink / raw)
  To: Steve French; +Cc: linux-fsdevel

steve-

see the NFS implementation of O_DIRECT in 2.6.  fs/nfs/{direct,file}.c

i use a modified version of "fsx" that does O_DIRECT standard I/O along
with mmap'd I/O through the page cache to test the NFS O_DIRECT
implementation.  each file descriptor is either cached or direct.

> -----Original Message-----
> From: Steve French [mailto:smfltc@us.ibm.com] 
> Sent: Wednesday, December 01, 2004 8:01 PM
> To: linux-fsdevel@vger.kernel.org
> Subject: O_DIRECT
> 
> 
> Is there a precise defintion of the Linux O_DIRECT  semantics, in 
> particularly addressing desired behavior in the cases of:
> 1) inodes opened more than once (some with and some without 
> O_DIRECT) - 
> do the other open file instances get disabled caching?
> 2) consistency of mmap data and sendfile data (how could this work 
> without write through of the page cache?) when inode is 
> opened O_DIRECT
> 
> If the goal of O_DIRECT is not only to bypass the local client's page 
> cache, but also to bypass the 4K read/write page size (and 
> allow larger 
> read, writes), is it acceptable for an fs to handle files opened 
> O_DIRECT to disable caching by turning off calls to generic_file_read 
> and generic_file_write for reads and writes to that inode (after a 
> sync)?  If not, is there a conventional "no cache" mount 
> option used by 
> other filesystems to do the equivalent on a mounted volume?
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-fsdevel" in the body of a message to 
> majordomo@vger.kernel.org More majordomo info at  
http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-02  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-02  1:01 O_DIRECT Steve French
  -- strict thread matches above, loose matches on Subject: below --
2004-12-02  2:50 O_DIRECT Lever, Charles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).