xfs
[Top] [All Lists]

Re: O_DIRECT address restrictions

To: jerj@xxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
Subject: Re: O_DIRECT address restrictions
From: "Rick Smith" <rgsmith72@xxxxxxxxxxx>
Date: Fri, 09 May 2003 10:34:54 -0700
Sender: linux-xfs-bounce@xxxxxxxxxxx
Yes, I am referring to memory physically on the video card itself (PCI), not system RAM. I am aware of the page alignment requirements of O_DIRECT under XFS, but usually I get an "invalid argument" (EINVAL) error when this requirement is not satisfied instead of the "bad address" (EFAULT) error that I am getting. Looking at the XFS code, there are some places where it bails with EFAULT after checking alignment, so I will look further into those. I have an API that returns the address of the actual video memory buffer on the card and I would like to be able to use O_DIRECT to blast data directly there in one step without a kernel buffer and a DMA step. Like I said, without O_DIRECT I can do the I/O to the video memory, but I need the speed of O_DIRECT. Is this possible?

Rick

From: "Jeremy Jackson" <jerj@xxxxxxxxxxxx>
To: "Rick Smith" <rgsmith72@xxxxxxxxxxx>, <linux-xfs@xxxxxxxxxxx>
Subject: Re: O_DIRECT address restrictions
Date: Fri, 9 May 2003 10:55:52 -0400

Hmm interesting... when you say mmaped video memory, do you mean PCI/AGP
memory *on* the video card, or system RAM?  I believe some of the replies
indicating that it should work were talking about system RAM?

I think the normal case is DMA from scsi card or ide or whatever to/from
system RAM. I don't think (but I don't know that much) that DMA from a scsi
card to another PCI card is the normal case. Can anyone comment furthur?


Jeremy
----- Original Message -----
From: "Rick Smith" <rgsmith72@xxxxxxxxxxx>
To: <linux-xfs@xxxxxxxxxxx>
Sent: Thursday, May 08, 2003 6:16 PM
Subject: O_DIRECT address restrictions


> Hello,
> 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?
>
> Any help appreciated. Thanks.
>
> Rick Smith
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>



_________________________________________________________________
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>