On Wed, Jun 28, 2000 at 04:41:55PM +0100, David Woodhouse wrote:
> I think it would be useful to provide a function which can be used to
> obtain a virtually-contiguous VM mapping of the pages of an iobuf.
Why? This is not as straightforward as it seems, so I'm curious as
to the intended use.
> Currently, to access the pages of an iobuf, you have to kmap() each page
> individually. For various purposes, it would be useful to be able to kmap the
> whole iobuf contiguously, so that you can guarantee that:
>
> page_address(iobuf->maplist[n]) + PAGE_SIZE
> == page_address(iobuf->maplist[n+1])
For any moderately large sized kiobuf, that just means that we risk
running out of kmaps. You need to treat kmaps as a scarce resource;
on PAE36-configured machines we only have 512 of them right now.
For user-space access, the current kiobuf patches already have mmap()
support for kiobufs so that getting a user-contiguous mapping of
kiobufs is already done. That doesn't have the kmap problem, though,
since we can map things into user page tables without pinning them in
kernel memory.
Cheers,
Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/