xfs
[Top] [All Lists]

Re: O_DIRECT address restrictions

To: ak@xxxxxxx
Subject: Re: O_DIRECT address restrictions
From: "Rick Smith" <rgsmith72@xxxxxxxxxxx>
Date: Sat, 10 May 2003 20:26:46 -0700
Cc: linux-xfs@xxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
I would be willing to upgrade memory to 4GB and/or modify the kernel to gain direct I/O functionality to/from PCI addresses 0xF0000000 through 0xF7FFFFFF. Could you recommend any resources (books, web sites, etc.) that would help guide me and understand what needs to be done? Thanks.

Rick


From: Andi Kleen <ak@xxxxxxx>
To: Rick Smith <rgsmith72@xxxxxxxxxxx>
CC: linux-xfs@xxxxxxxxxxx
Subject: Re: O_DIRECT address restrictions
Date: Sat, 10 May 2003 06:30:46 +0200

On Fri, May 09, 2003 at 09:11:30PM -0700, Rick Smith wrote:
> 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?

I don't think that will work. The direct IO path works with struct page
structures in the kernel mem_map array, but these hardware mappings don't have
an entry in mem_map and no struct page.

In theory you could hack your kernel to include them in the mem_map, but
it would need some surgery in early bootup and could potentially need a
lot of memory. The mem_map array does not allow holes in a non NUMA kernel
so if you try to map 0xF0000000 you'll always need an mem_map that covers
the full 4GB of low memory. All these struct pages add up and cost quite
a lot of memory.

It will likely work when you use an machine with more than 4GB of memory
installed.  It already has mem_map entries for the PCI holes.

-Andi

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


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