LWN.net Logo

2.6 swapping behavior

2.6 swapping behavior

Posted May 6, 2004 20:47 UTC (Thu) by thyrsus (subscriber, #21004)
Parent article: 2.6 swapping behavior

In olden days, the sticky bit on binary executables gave the kernel a hint that it should avoid swapping/paging out the memory for that executable. Might that still be appropriate today?


(Log in to post comments)

2.6 swapping behavior

Posted May 7, 2004 5:12 UTC (Fri) by maney (subscriber, #12630) [Link]

I'm afraid you've been misinformed. The sticky bit told the kernel not to purge the executable from swap when it wasn't running (until there was no non-sticky swap available to avoid an out of memory panic, of course). IIRC, this actually goes back to the days when it wasn't swapping as we know it, but the wholesale paging of an app's executable memory in one chunk. (recall that on the PDP-11, executable space was less than 64KB maximum, and the memory management didn't support page swapping anyway)

So the traditional use of the sticky bit is actually rather the opposite of what's wanted here! It's also less than clear that attaching the swap me only under duress property statically to the source file is the best choice even if it turns out to be practical to prioritize non-cache pages at that granularity. One obvious complication (that also wasn't present in the PDP-11 paging model) is shared libraries.

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