Messages in this thread |  | | Date | Thu, 23 Jan 1997 00:01:15 -0500 | From | "David S. Miller" <> | Subject | Re: DMA question |
| |
From: alan@lxorguk.ukuu.org.uk (Alan Cox) Date: Wed, 22 Jan 1997 20:24:29 +0000 (GMT)
> So, is there a reasonable way to put processes to sleep when they > try to access a prespecified range of memory, so that the driver > can wake them up when DMA has finished?
Assuming you have to ensure this doesn't occur, then you can ummap before the DMA and remap them at the end. Modify the fault handler to sleep the process if it faults on the device.
You could be even more clever, and modify less code. Mark the pages in the group being DMA'd as "pages in transit", unmap the process pages, when the fault happens make sure the page_struct's look in such a way that the process gets put to sleep, when the DMA is done wake up anyone "waiting on the page". Should work with minor modifications to the current page fault handling.
Results might even be super useful for our eventual page flipping architecture (hint hint..) ;-)
---------------------------------------------//// Yow! 11.26 MB/s remote host TCP bandwidth & //// 199 usec remote TCP latency over 100Mb/s //// ethernet. Beat that! //// -----------------------------------------////__________ o David S. Miller, davem@caip.rutgers.edu /_____________/ / // /_/ ><
|  |