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

Pages swapped out even when free memory available...



Hi,
I have a program in which I manage myself the swapping of elements from memory to disk.
So I dont want the kernel to swap out some pages. Ill do it if quite no more free memory is available.
 
I tried to use MAP_LOCKED when calling mmap, but without success. Is it implemented in Linux?
Is there a way to lock pages in memory so they are not swapped?
 
Is there a way to say to the kernel to reload swapped out pages back in memory?
 
If I read back all my memory, will all the swap be back in the memory?
Is it enough to read ione byte/page to reload the entire page in memory?
 
Is it possible to tell the kernel the maximum amount of disk cache it should use?
 
Thanks for any help
-jec
 

zޖwn'iy!^Wvmdzޔ
܆+ކiY)ƊGg{zmzY