Re: Locking user space buffer in physical mem using get_user_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi..

First of all, thank you for sharing your finding. Actually, I came to the same conclusion too yesterday, but I didn't have enough free time to explain what I have found completely. Sorry for that...
After digging into the source of get_user_pages I found that at a
certain point, page_cache_get is called on every page in the buffer which in turn calls get_page
which will atomically increase the _count member of struct page

Could it be that because of this the memory management will make sure
that the related page(s) will be kept in phys mem (in other words, it
will prevent that they can be swapped out) ?


Since both of us (and no one else joins this thread so far) came to the same point, I guess we implicitly agree that somehow Linux 2.6.x VM checks this (reference?) counter and doesn't swap this kind of page.

regards,

Mulyadi

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux