Re: How to map high memory for block io

Jens Axboe
2006-01-27T10:24:04Z

On Fri, Jan 27 2006, Pierre Ossman wrote:
> I'm having some problems getting high memory support to work smoothly in
> my driver. The documentation doesn't indicate what I might be doing
> wrong so I'll have to ask here.
>
> The problem seems to be that kmap & co maps a single page into kernel
> memory. So when I happen to cross page boundaries I start corrupting
> some unrelated parts of the kernel. I would prefer not having to
> consider page boundaries in an already messy PIO loop, so I've been
> trying to find either a routine to map an entire sg entry or some way to
> force the block layer to not give me stuff crossing pages.
>
> As you can guess I have not found anything that can do what I want, so
> some pointers would be nice.

Honestly, just don't bother if you are doing PIO anyways. Just tell the
block layer that you want io bounced for you instead.

--
Jens Axboe