Yet another approach to memory fragmentation
Yet another approach to memory fragmentation
Posted Feb 14, 2005 8:40 UTC (Mon) by Nir (guest, #27440)Parent article: Yet another approach to memory fragmentation
I have a question. I hope I am not too rude. i am trying to understand whether high memory is visible in interrupt context ? When sending/getting a buffer to disk or NIC from an application that mapped high memory pages ( > 1GB ) are they copied to a normal memory and then copied to the user buffer ? Thank you. Raz Ben Jehuda razb@bitband.com
Posted Feb 18, 2005 3:57 UTC (Fri)
by xoddam (guest, #2322)
[Link]
Ultimately, the high-memory pages will be mapped temporarily into the mapping of high-memory pages
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
mapping.
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().