2 ms·
...and in fact, it does so: http://lxr.linux.no/#linux+v3.0/mm/swapfile.c#L2117 http://lxr.linux.no/#linux+v3.0/mm/swapfile.c#L2117 (and has since kernel 2.6.29
by caf 15y ago
...and in fact, it does so: http://lxr.linux.no/#linux+v3.0/mm/swapfile.c#L2117 http://lxr.linux.no/#linux+v3.0/mm/swapfile.c#L2117 (and has since kernel 2.6.29).
Additionally, if you set the SWAP_FLAG_DISCARD flag to swapon(2), it'll issue TRIMs for swap space that is freed at runtime. You'll need a pretty recent /sbin/swapon to support that flag, though.