LWN.net Logo

2.6 swapping behavior

2.6 swapping behavior

Posted May 6, 2004 17:50 UTC (Thu) by xorbe (subscriber, #3165)
Parent article: 2.6 swapping behavior

"Without swapping application memory to disk and seeing what gets faulted back in, it is almost impossible to figure out which pages are not really needed."

Oh come on.

You mark the app's pages inaccessible. When the app touches it, the OS notes that the app really does have permissions, changes, and resumes the app. Pages that are never touched after a while can be dropped to swap.


(Log in to post comments)

2.6 swapping behavior

Posted May 6, 2004 18:21 UTC (Thu) by corbet (editor, #1) [Link]

"You mark the app's pages inaccessible. When the app touches it, the OS notes that the app really does have permissions, changes, and resumes the app. Pages that are never touched after a while can be dropped to swap.

That sounds vaguely like what the 2.4 VM did. It works, but you have to mess around with a lot of page table entries, keep track of which pages you have invalidated (in affected process's page tables), and know when to get around to cleaning them up.

To an extent, things are pretty much still done that way, actually; pages are pulled from pages tables and put into the inactive list. Eventually they find their way to swap. If some process wants them in the mean time, they are soft-faulted back in.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds