Re: mmap() better than read() fro streaming

Ken Pizzini (ken@halcyon.com)
Thu, 26 Aug 1999 22:40:41 -0700


On 26 Aug 1999 13:39:04 -0400, Zygo Blaxell <qfohaeid@umail.corel.com> wrote:
>mmap() works until you have a file that is larger than you can specify as an
>offset to mmap(). After a few minutes of uncompressed video, mmap() runs
>out of address bits.
>
>For no rational technical reason, I'd prefer a solution that uses no data
>buffering in the kernel at all (file metadata is OK, but no data blocks
>in the cache). In this case read-ahead can be done in user-space by a number
>of I/O threads generating interleaved, efficiently-sized read requests.
>In effect, this is user-space simulation of asynchronous I/O.

The mmap() address space problem only exists if you attempt to
mmap() the whole file in at once. If you only mmap() in chunks
of the file in at a time then you can simulate the user-space
read-ahead by a second mapping ocurring while the first map is
still being used.

--Ken Pizzini

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