Messages in this thread | | | Date | Fri, 08 Aug 1997 13:25:53 -0500 (EST) | From | "Mark H. Wood" <> | Subject | Re: Kernel virtual memory? |
| |
On Thu, 7 Aug 1997, Bryn Paul Arnold Jones wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > > On Thu, 7 Aug 1997, Rauli Ruohonen wrote: > > > Could kernel use virtual memory hardware to make non-linear chunks of > > memory to look linear? It seems to me that it could solve the problems > > with memory fragmentation and DMA memory allocation. > > > > 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. > > > > So, is this possible/feasible/too ugly to implement? > > > > 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). The DMAing is actually done by whatever card is > transferring the data, and so it's talking to physical memory using > physical addresses.
You *can* get away with that sort of thing, but only if (1) you can guarantee that no I/O buffer will ever cross a page boundary, (2) you write all drivers so that they lock down all buffers in physically contiguous memory before starting an I/O, or (3) all of your peripheral controllers will accept scatter/gather lists and you're willing to write drivers that can set them up. (2)'s the way you usually see it, but that'd require rewriting a lot of drivers if it wasn't designed in from Day One.
Mark H. Wood, Lead System Programmer MWOOD@INDYVAX.IUPUI.EDU Those who will not learn from history are doomed to reimplement it.
| |