views:

33

answers:

0

I have a device driver that uses buffers in RAM that I want the user to be able to map to user space. I have read http://lwn.net/images/pdf/LDD3/ch15.pdf which talks about using nopages, but the example there only uses single pages and says you can adjust usage counts to make it work for multiple pages. I don't understand how that works. It uses get_free_page with an order of 0 (so 1 free page) to allocate its buffers, but my buffer is two pages long.

What does the usage count have to do with anything? From what I understand, only the first page is counted.