Slow shutdown with big file in /dev/shm

Bojan Smojver bojan at
Tue Mar 20 13:19:27 UTC 2012

Adam Jackson <ajax at> wrote:

>Presumably because that file got paged out.
>Think about it.  Disabling swap doesn't know that the file exists only 
>on a RAM-based file system, and even if it did, doesn't know that we're
>about to shut down.  So swapoff has to assume that any pages currently 
>in the swap area being disabled might be valuable, and has to read them
>back into memory.
>Now as to why we disable swap on shutdown, I'm not really sure.  It 
>certainly seems like useless work to me.

Would it help if all memory based file systems got unmounted before swap gets disabled? That would kill these files, right?


More information about the devel mailing list