On Tue, 22 May 2007 11:20:49 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> wrote:
> Besides, can vmalloc be used for allocating DMA buffers? AFAIK it > doesn't have any mechanism for respecting DMA memory location > requirements (the DMA mask). Running DMA into vmalloc area can be done with some effort. I think that one can use __vmalloc() with GFP_DMA32 instead of vmalloc(). The original implementation of it was in V4L, copied multiply times all over the kernel since. Kraxel likes doing it for some reason. Personally, I hate it. The usbmon is an example of the alternative approach where the map is kept explicit. The usbmon does NOT do the DMA as it is, but it does have the mmap code, which I plan to borrow if I need to write a hardware driver in the future. It is often easy to run out of vmalloc space and this actually does happen from time to time to our customers in Hollywood who want screen grabbing on i686. Andi decided that it's easier to swim with the flow and so x86_64 offers an enormous vmalloc area which is guaranteed to be big enough for all of physical memory. It may be one of those things like __attribute__((packed)). I regard it overused and lame, other people love it. If someone (Laurent?) rolls out a buffer allocator which builds upon vmalloc, I guess I'll have to look for specific flaws in that. It's not something completely impossible, but we'll need to see the use examples. -- Pete ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel