mapping of high-memory pages
Posted Feb 18, 2005 3:57 UTC (Fri) by xoddam
In reply to: Yet another approach to memory fragmentation
Parent article: Yet another approach to memory fragmentation
Ultimately, the high-memory pages will be mapped temporarily into the
kernel address space.
Driver writers have the option of using a buffer in normal memory and
copy_to_user()/copy_from_user() functions to transfer data to/from
userspace. These functions hide the details of the virtual address
Alternatively the driver can use get_user_pages() to 'pin' the userspace
pages into memory and kmap() to get the kernel address of each page.
kmap() will return the fixed address of a normal page, or map a high
memory page into the kernel. The pages must be released afterwards with
kunmap() (a noop if the page is normal) and page_cache_release().
to post comments)