How to tune the number of pages that is brought into the memory when a page fault occurs .
Konstantin Belousov
kostikbel at gmail.com
Fri Oct 16 10:15:56 UTC 2020
On Fri, Oct 16, 2020 at 01:37:56PM +0530, SHAMANTHA KRISHNA K G wrote:
> Hello All,
> Is there any way of changing the number of pages that Is brought
> into the memory when a page fault occurs?
Look at madvise(2) and posix_madvise(2). It does not give the direct knob
to change the number, but it allows to set a policy affecting this decision.
In particular, it allows to disable prefeching at all with MADV_RANDOM.
The mmap(2) syscall also provides MAP_PREFAULT_READ, read about it in the
man page.
More information about the freebsd-hackers
mailing list