KOSAKI Motohiro wrote: >> Next, I set the following: >> >> echo 0 > /proc/sys/vm/swappiness >> >> ... hoping it would prevent paging out of the UI in favor of file data that's >> only used once. It did appear to help to a small degree, but not much. The >> system is still effectively unusable while a file copy is going on. >> >> From this, I diagnosed that most likely, the kernel was paging out all my >> application file mmap() data (such as my executables and shared libraries) in >> favor of total garbage VM load from the file copy. I believe your analysis is correct. When merging the split LRU code upstream, some code was changed (for scalability reasons) that results in active file pages being moved to the inactive list any time we evict inactive file pages. Even if the active file pages are referenced, they are not protected from the streaming IO. However, the use-once policy in the VM depends on the active pages being protected from streaming IO. A little before the decision to no longer honor the referenced bit on active file pages was made, we dropped an ugly patch (by me) after deciding it was just too much of a hack. However, now that we have _no_ protection for active file pages against large amounts of streaming IO, we may want to reinstate something like it. Hopefully in a prettier way... The old patch is attached for inspiration, discussion and maybe testing :) -- All rights reversed.