Linux-kernel mailing list archive 2000-26,: Re: kmap_kiobuf()

# Re: kmap_kiobuf()

Stephen C. Tweedie (sct@redhat.com)
Wed, 28 Jun 2000 18:44:28 +0100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: tom_gall@vnet.ibm.com: "Re: POWER Port"
- Previous message: H. Peter Anvin: "Re: POWER Port"

Hi,

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/

- Next message: tom_gall@vnet.ibm.com: "Re: POWER Port"
- Previous message: H. Peter Anvin: "Re: POWER Port"