Messages in this thread | | | From | Eric Lowe <> | Subject | RE: kernel virtual page locking.. | Date | Fri, 30 Apr 1999 12:57:37 -0400 |
| |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0"> <TITLE>RE: kernel virtual page locking..</TITLE> </HEAD> <BODY>
<P><FONT SIZE=2>> If I want to do a DMA operation in a character driver, i </FONT> <BR><FONT SIZE=2>> believe i have </FONT> <BR><FONT SIZE=2>> to use physical memory. ( by getting kvirt_to_phys() ). </FONT> <BR><FONT SIZE=2>> Is there a fear of this memory getting swapped out while the DMA </FONT> <BR><FONT SIZE=2>> operation is in progress.? If so, then there must be some mechanism of</FONT> <BR><FONT SIZE=2>> locking the pages in the driver. What are the utilities available for</FONT> <BR><FONT SIZE=2>> locking kernel virtual memory.? </FONT> </P>
<P><FONT SIZE=2>There have been several threads discussing this over the past few weeks. One such thread was "Process VM Addr to Kernel VM Addr at Interrupt Time". You'll want to see our comments in there.</FONT></P>
<P><FONT SIZE=2>Currently, there is no standard mechanism for doing this in the kernel. Instead, you must vmalloc() or kmalloc() memory and use mmap() to map the kernel memory into the application space. (See the bttv driver in the 2.2.x kernels for an example) The second method is to use bounce buffers (e.g. copy_from_user), though your CPU utilization will be high if you do this.</FONT></P>
<P><FONT SIZE=2>There is real work going on to support user space I/O. If your driver is a block driver, there is a Raw I/O patch already out there; see Stephen Tweedie (sct@redhat.com) with questions or comments about that. It's at <A HREF="ftp://ftp.linux.org.uk/pub/linux/sct/fs/raw*" TARGET="_blank">ftp://ftp.linux.org.uk/pub/linux/sct/fs/raw*</A>.</FONT></P>
<P><FONT SIZE=2>--</FONT> <BR><FONT SIZE=2>Eric Lowe</FONT> <BR><FONT SIZE=2>elowe@systran.com</FONT> <BR><FONT SIZE=2>Software Engineer Co-op, Systran Corporation</FONT> <BR><FONT SIZE=2>937-252-5601 x330</FONT> <BR><FONT SIZE=2>((my e-mail gateway is adding the HTML, I can't disable it; please don't flame me))</FONT> </P>
</BODY> </HTML> | |