Messages in this thread | | | Date | Thu, 08 Mar 2007 18:35:55 -0600 | From | Robert Hancock <> | Subject | Re: Question about memory mapping mechanism |
| |
Martin Drab wrote: > Hi, > > I'm writing a driver for a sampling device that is constantly delivering a > relatively high amount of data (about 16 MB/s) and I need to deliver the > data to the user-space ASAP. To prevent data loss I create a queue of > buffers (consisting of few pages each) which are more or less directly > filled by the device and then mapped to the user-space via mmap(). > > The thing is that I'd like to prevent kernel to swap these pages out, > because then I may loose some data when they are not available in time > for the next round.
It would likely be easier to just mlock this buffer from the userspace application, rather than trying to achieve this in the driver..
-- Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from hancockr@nospamshaw.ca Home Page: http://www.roberthancock.com/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |