RE: When can I call SetPageReserved()?

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

 



Can you use mlock() from user space, before you pass down the memory to
kernel space ?

$ man mlock

dom

-----Original Message-----
From: kernelnewbies-bounce@nl.linux.org
[mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of Timur Tabi
Sent: Thursday, June 10, 2004 11:30 AM
To: kernelnewbies@nl.linux.org
Subject: When can I call SetPageReserved()?


I'm trying to figure out what kind of memory I can call 
SetPageReserved() on.  Is it okay to use it on memory obtained via a 
kiobuf?  I get the feeling that SetPageReserved() should only be used on

memory that is allocated in the kernel itself, such as a DMA buffer 
allocated via kmalloc(), and never on memory that is allocated by a user

process (which is what kiobuf gives me).  Is that correct?

The problem we're seeing is that the VM is swapping out pages obtained 
via a kiobuf.  We can't use lock_kiobuf() because sometimes the memory 
regions overlap, and lock_kiobuf() rejects attempts to lock memory that 
already has at least one locked page.

-- 
Timur Tabi
Staff Software Engineer
timur.tabi@ammasso.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


--
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