On Wed, Mar 18, 2009 at 08:52:40PM +0800, Priya Suryanarayanan wrote: > I have not ever used the direct I/O APIs. I understand these enable > mapping user buffers to kernel address space ( get_user_pages() ) and > the reverse - mapping kernel buffers to user address space ( mmap() ). > However, I find the explanation in Rubini hard to follow, (especially > for mmap()), and the sample drivers are slightly better. I would recommend reading chapter 15 of Linux Device Drivers, Third Edition: http://lwn.net/Kernel/LDD3/ It has a section on performing direct I/O and also covers using mmap() in pretty good detail. I should also mention that get_user_pages() does not map a user-mode buffer into the kernel address space. It only returns a page locked array of the physical pages from the user-mode buffer. That is OK because you normally don't need the buffer mapped to the kernel address space when performing direct I/O. -- Shawn -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ