User: Password:
Subscribe / Log in / New account

mapping of high-memory pages

mapping of high-memory pages

Posted Feb 18, 2005 3:57 UTC (Fri) by xoddam (subscriber, #2322)
In reply to: Yet another approach to memory fragmentation by Nir
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().

(Log in to post comments)

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds