Re: [patch] zero-bounce highmem I/O

From: Gerd Knorr (kraxel@bytesex.org)
Date: Thu Aug 16 2001 - 08:35:41 EST


> To be honest, you really shouldn't care about this. If you are
> writing a block device, the block/scsi/ide/whatever layer should take
> care to only give you memory that can be DMA'd to/from.
>
> Same goes for the networking layer.

bttv is neither blkdev nor networking ...

The current kernel's bttv (0.7.x) uses vmalloc_32() for video buffers
and remaps these pages to userspace then. My current devel versions
(0.8.x) use a completely different approach: mmap() simply returns
shared anonymous memory, and bttv uses kiobufs then to lock pages for
I/O.

This has the adwantage that the video buffers don't waste unswappable
kernel memory any more. It also easy to write video data to any
userspace address (read() does that for example, so I don't have to
copy_to_user() the big video frames).

On the other hand I have a new problem now: I have to deal with highmem
pages (that works with the highmem-I/O patches) and with pages which are
outside the DMA-able memory area (hmm...).

  Gerd

-- 
Damn lot people confuse usability and eye-candy.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:15 EST