xfs
[Top] [All Lists]

Re: O_DIRECT address restrictions

To: linux-xfs@xxxxxxxxxxx
Subject: Re: O_DIRECT address restrictions
From: "Rick Smith" <rgsmith72@xxxxxxxxxxx>
Date: Fri, 09 May 2003 21:11:30 -0700
Sender: linux-xfs-bounce@xxxxxxxxxxx
It turns out that my problem is not specifically with XFS, but with any filesystem that supports O_DIRECT. Is it possible to perform direct I/O to addresses 0xF0000000 and above that are mmaped into user space? I am able to write to this memory with normal I/O, so how does this differ from O_DIRECT in this respect?

Any help is appreciated. Thanks.

Rick


From: Steve Lord <lord@xxxxxxx>
To: Andi Kleen <ak@xxxxxxx>
CC: Rick Smith <rgsmith72@xxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
Subject: Re: O_DIRECT address restrictions
Date: 08 May 2003 21:27:52 -0500

On Thu, 2003-05-08 at 21:19, Andi Kleen wrote:
> On Thu, May 08, 2003 at 03:16:22PM -0700, Rick Smith wrote:
> > What are the memory address restrictions when using the O_DIRECT flag
> > with XFS? I am trying to perform I/O directly from the filesystem to a
> > piece of mmap'ed video memory and I get the "bad address" error when I
> > attempt to do so with O_DIRECT. Without the O_DIRECT flag I am able to
> > perform the I/O but is it must too slow. Using O_DIRECT with other system
> > memory seems to work fine, but I would like the option of transferring data
> > directly to a video card without a bounce buffer and a DMA step. Is direct
> > I/O available to any memory address that satisfies the alignment
> > requirement or must this address be below the MAX_DMA_ADDR?
>
> The only restriction is that the base address and the size must be an
> multiply of the block size of the file system (normally 4K)


Rick,

Do a man 5 on xfs and read the section on XFS_IOC_DIOINFO, if you
program using this interface then should we change the alignment
restrictions in xfs your programs will continue to work. There is
code to reduce the alignment restriction to 512 bytes.

Steve



_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



<Prev in Thread] Current Thread [Next in Thread>