Why would some process swap in place of reclaiming free(cached) memory

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

 



Hi all,

I posted this question in linux-mm list as well but it didn't spawn much interest. So, I am putting the same question here also. Would love if someone can put some traction.

The question is salivating and simple. When we have free and lotsa cached memory in a system (irrespective of distro and kernel), why would some process end up in swap space, I understand the overcommit mode of vm, the default value of 0 and what it does. I also know that the cache might be dirty and we don't might not want to allocate free pages thinking that we might go under the watermark of low. But, I mainly end up getting this question from end users - why would things swap if I have free memory. I guess, technically we can't stop swapping even if we set vm.swappiness to 0 but well, I think I have said what I need to said. If you need data, I can provide those.

Any reference to source where it gives the condition to transfer some pages to swap, despite of having free memory, would be highly appreciated. I tried to find in mm/vmscan.c but didn't get much success.

Soham


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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