Messages in this thread | | | Date | Fri, 8 Aug 1997 02:31:45 +0300 | From | Rauli Ruohonen <> | Subject | Re: Kernel virtual memory? |
| |
>> DMA memory could be allocated by moving allocated blocks away from the >> lower 16MB, and other parts of kernel could be made happy by changing the >> page tables accordingly. > >Erm DMA stands for direct memory access, the CPU doesn't get a look-in >(past seting it all up), and so can't mess about (that's the advantage, >the CPU isn't tied up).
Yes yes yes yes, but you need the memory where the data is transferred to/from and it must reside below 16MB, if the lower 16MB is full you can't allocate DMA buffers! Thus when you insmod a module you may get errors that "can't alloc dma memory" or similar. That's why those pages should be moved out of the way! And no, I don't mean that if this kind of feature is added coders should begin doing something idiotic like this:
alloc_dma_mem(); begin_dma();
interrupt_handler() { if(dma_done) free_dma_mem(); }
Just to clarify, the DMA part of this suggestion is only for those rare situations when ftape/floppy driver shouts that it can't alloc DMAable page. The main point was that the memory fragmentation would no longer be an issue, and I think that this would remove some kludges.. At least that's what I gathered from the SLAB discussion, *I* haven't looked at that part of the code so the kludges part is just wild guessing.. :)
I hope you guys now understand what I mean, so you can tell me if it'll work :^)
-- Air is water with holes in it.
| |