nefelim4ag / systemd-swap

Script for creating hybrid swap space from zram swaps, swap files and swap partitions.
GNU General Public License v3.0
550 stars 81 forks source link

swapfc_priority reaching negative values on long running systems #192

Open vilgotf opened 3 years ago

vilgotf commented 3 years ago

On a long-running system with swapfc enabled swapfc_priority=50 can eventually reach 0 (generating kernel errors) as seen here: #135. Looping back to the value of swapfc_priority close to 0 is not a valid solution since that would mean that the highest priority swap file would be the first to be removed.

A better solution would be to disable swapfc_priority when it's 0 and let the kernel manage priorities (it has exclusive rights to priority -1...).