You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Speaking of activating stuff in the kernel, would if be possible to activate Zswap? It's a bit more recent than the Zram that 4.x kernels use in SailfishOS.
Ideally:
CONFIG_ZSWAP=y
# CONFIG_ZSWAP_DEFAULT_ON is not set
CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4=y
CONFIG_ZSWAP_COMPRESSOR_DEFAULT="lz4"
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD=y
CONFIG_ZSWAP_ZPOOL_DEFAULT="zbud"
It's interesting because Zswap is a cache, not a different separate swap block device.
So when the cache is full, the oldest (and thus coldest) pages are moved to the on-disk (well, on-flash) swap. The most recent (and thus hottest) pages are still in the cache.
Whereas Zram is just another swap device. It's possible to give it a higher priority, so it gets used first. But once it's full, kernel will simply move onto the next highest priority swap block device. So there's risk that the RAM is used for very old pages which aren't used often anymore, while the flash is undergoing thrashing as the various active apps are swaped in and out of it.
(for reference, I use Zswap on both my laptops, including the closely related Pinebook Pro).
The text was updated successfully, but these errors were encountered:
Note: recent kernels on other distro seem to be moving toward zsmalloc as default memory allocator for zswap.
It's the default allocator that Zram uses in SailfishOS so it's already compiled in anyway.
And in recent versions, zsmalloc has gained the capability to "evict" old cached pages to physical swap (which previously only zbud abd z3fold did support).
I would suggest changing:
CONFIG_ZSWAP_ZPOOL_DEFAULT="zsmalloc"
to follow the general trend (though I would suspect that bufs who know to use zswap will know to setup that on the u-boot command file anyway)
Speaking of activating stuff in the kernel, would if be possible to activate Zswap? It's a bit more recent than the Zram that 4.x kernels use in SailfishOS.
Ideally:
It's interesting because Zswap is a cache, not a different separate swap block device.
So when the cache is full, the oldest (and thus coldest) pages are moved to the on-disk (well, on-flash) swap. The most recent (and thus hottest) pages are still in the cache.
Whereas Zram is just another swap device. It's possible to give it a higher priority, so it gets used first. But once it's full, kernel will simply move onto the next highest priority swap block device. So there's risk that the RAM is used for very old pages which aren't used often anymore, while the flash is undergoing thrashing as the various active apps are swaped in and out of it.
(for reference, I use Zswap on both my laptops, including the closely related Pinebook Pro).
The text was updated successfully, but these errors were encountered: