Re:In defense of swap: common misconceptions (2018)
by tsimionescu on Thursday April 21, 2022 @02:07AM
(#31106447)
I think it's usually code page thrashing, since executables and shared libraries can always be swapped back out to disk, only to be swapped back in when the process gets the next quanta of time to execute. If people say instruction cache misses are costly, wait till you need to read the next instruction from a 5400 RPM HDD...
[ Parent
| on HN ]
Re:In defense of swap: common misconceptions (2018)
by bogomipz on Thursday April 21, 2022 @12:14PM
(#31111396)
Thanks, understood. However file-backed pages such as executables and shared libs are not written to swap space as the pages are just dropped and read back in from the regular(non-swap) filesystem no? Not that causes any less disk I/O of course but they are not anonymous pages which is generally what is written to swap. When I think swap I think of "written to swap" but maybe you mean swap in the general sense of paged out?
Re:In defense of swap: common misconceptions (2018)
by tsimionescu on Thursday April 21, 2022 @01:14PM
(#31112265)
Yes, I meant "swapped out" in the general sense of "paged out". On the other hand, if you have actual swap space, hot code pages will be much less likely to be paged out than colder anonymous pages.