lkml.org 
[lkml]   [1997]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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 /_____________/ / // /_/ ><

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:1.762 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site