Skip to contentSkip to conversation

2.3.x swap cache seems to be a big leak

DISCUSSION David S. Miller 2 participants 2 messages Apr 25, 2000 – Jun 3, 2000 Memory management

lore
Share & tools
lore
#0 lore raw

__delete_from_swap_cache depends upon remove_inode_page doing a put_page or similar to kill the reference of the swap cache itself

We changed remove_inode_page during the page cache rewrite such that is no longer puts the page, the caller does.

If I am right, this causes swap cache pages to never go away.

So if I haven't missed something clever going on here, this would explain a lot of problems people have reported with swapping making their machines act weird and eventually run out of ram.

Later,
David S. Miller
[email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#1 lore raw
Quoted 3 lines · David S. Miller

__delete_from_swap_cache depends upon remove_inode_page doing a put_page or similar to kill the reference of the swap cache itself

__delete_from_swap_cache must not decrease the reference count.

Quoted 2 lines

We changed remove_inode_page during the page cache rewrite such that is no longer puts the page, the caller does.

shrink_mmap does in the made_inode_progress path (first release the swap cache reference and then frees the page by issuing two put_page).

Quoted 3 lines

So if I haven't missed something clever going on here, this would explain a lot of problems people have reported with swapping making their machines act weird and eventually run out of ram.

That's because the MM balancing is broken. Try to reproduce with the classzone patch applied.

Andrea

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/