The madvise() functions and similar are a blunt and imprecise instrument. The kernel is free to ignore them, and frequently does in practice. It also does not prevent the kernel from proactively doing things you don't want it to do with your buffer pool at the worst possible time.
A user space buffer pool gives you precise and deterministic control of many of these behaviors.
A user space buffer pool gives you precise and deterministic control of many of these behaviors.