阅读背景:

如何将Linux内核缓冲区映射到用户空间?

来源:互联网 

Let's say the buffer is allocated using a page based scheme. One way to implement mmap would be to use remap_pfn_range but LDD3 says this does not work for conventional memory. It appears we can work around this by marking the page(s) reserved using SetPageReserved so that it gets locked in memory. But isn't all kernel memory already non-swappable i.e. already reserved? Why the need to set the reserved bit explicitly?Let's say the buffer is allocated using a page




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: