← Back to context

Comment by yencabulator

2 days ago

Unless you explicitly prevent it, the kernel might swap out lesser-used parts of your object pool, dedupe pages, and so on. Accessing that page again may be much slower and potentially fail due to OOM.

To actually control all dynamic behavior you need to go deeper into the system, locking pages into memory etc.

https://www.kernel.org/doc/html/latest/admin-guide/mm/zswap....

https://en.wikipedia.org/wiki/Kernel_same-page_merging

https://www.man7.org/linux/man-pages/man2/mlock.2.html