swap page issue

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

 



 Hi,

  Please help me to understand the issue with a swap page.

  this is in 2.4 kernel. An anonymous page of a process is added to the 
swap cache using add_to_swap_cache() and the page table entry is set to 
the swap entry. ( try_to_swap_out()). And at sometime later in 
shrink_cache(), that page is written to the swap disk using 
swap_writepage(). But in swap_writepage(), the page is first tested to see 
if it is an exclusive swap page ie the page is owned by only one process 
and it is removed from the swap cache without writing to the swap disk. 
Please correct if I have misunderstood over here.  Now the page is no more 
in the swap cache and if the process faults on this page and it tries to 
get this page from the swap cache which is no more in the cache now. I 
definitely am losing a link over 
here. 

 Can you please explain me what correctly happens during swapping out of a 
page?

 Thanks,
 Raghu.


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