Messages in this thread | | | Date | Sun, 1 Nov 1998 14:05:23 +0200 (IST) | From | Ariel Rosenblatt <> | Subject | Swapping-bug |
| |
If a process that requires more memory than available and therefore causes many of its pages to be swapped (could be around half of the total memory), terminates or releases its memory while its pages are still scheduled for delayed-write to the disk, all those pages will remain in the swap_cache (and even with a high "age" value), so that although nobody needs those pages, which should go to the free-list, they hang around there indefinitely until other processes run out of memory.ry.free memory. When that eventually happens, only then those pages begin to age, while good pages are stolen from other processes in the meanwhile.
The reason is that while pages are scheduled to be written to disk, their page-count is increased. When the process frees the pages in "free_page_and_swap_cache", it believes that the pages are shared by another process and therefore keeps the pages in the swap-cache, But when the I/O operation is complete, no one takes the page, now with a count of 1 - only due to its being in the swap-cache, out of the swap cache: that should be done at the end of "after_unlock_page" in the file "fs/buffer.c".
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ Ariel Rosenblatt (arielr@cs.huji.ac.il) \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ ______ ____ ___ ___ _ __ / MOSIX Development Group ) ) ) ) ) ( ' ) \ / \ The Hebrew University / / / / / \ / / \ of Jerusalem, Israel ( ( (___( ___) _(_ __/ \ \ \ ______________ E-mail : mosix-devel@cs.huji.ac.il ________________) _______________ Bugs : mosix-bugs@cs.huji.ac.il _________________)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |