Re: page locking from application

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

 



Thomas Petazzoni wrote:
> Hi,
> 
> Le Fri, 21 Jul 2006 14:28:13 +0530,
> "Linux Learner" <learner.kernel@xxxxxxxxx> a écrit :
> 
>> Is it possible to do some kind of page locking or pinning from
>> application, so that kernel doesn't swap out the page as long as
>> application is alive? For example, I want a global variable's address
>> to be valid in kernel (here validity only means the page corresponding
>> to user space virtual address to be present).
> 
> Use copy_from_user() in the kernel. It will automagically fetch the
> page from swap or from anywhere it is.
> 

Wouldn't mlockall used in the application do it?

Mark


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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