lkml.org 
[lkml]   [1998]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSwapping-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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.990 / U:2.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site