Re: When can I call SetPageReserved()?

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

 



On Thu, Jun 10, 2004 at 11:29:41 -0500, Timur Tabi wrote:
> 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.

The great thing about Linux is, that you have the source. Use it! Read
how lock_kiobuf works and write your own function that will do relevant
counting on how many kiobufs you have that page.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[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