Invalidate zswap entries when pages are loaded
configname: CONFIG_ZSWAP_EXCLUSIVE_LOADS_DEFAULT_ON
Linux Kernel Configuration
└─>Memory Management options
└─>Invalidate zswap entries when pages are loaded
In linux kernel since version 6.5 (release Date: 2023-08-27)
If selected, exclusive loads for zswap will be enabled at boot,
otherwise it will be disabled.
If exclusive loads are enabled, when a page is loaded from zswap,
the zswap entry is invalidated at once, as opposed to leaving it
in zswap until the swap entry is freed.
This avoids having two copies of the same page in memory
(compressed and uncompressed) after faulting in a page from zswap.
The cost is that if the page was never dirtied and needs to be
swapped out again, it will be re-compressed.
otherwise it will be disabled.
If exclusive loads are enabled, when a page is loaded from zswap,
the zswap entry is invalidated at once, as opposed to leaving it
in zswap until the swap entry is freed.
This avoids having two copies of the same page in memory
(compressed and uncompressed) after faulting in a page from zswap.
The cost is that if the page was never dirtied and needs to be
swapped out again, it will be re-compressed.