Hacker News new | ask | show | jobs
by masklinn 58 days ago
It’s the mincore which debugnik mentioned. And there’s madvise(MADV_WILLNEED) which triggers an asynchronous prefetch.
1 comments

I was biten by not understanding madvise(MADV_WILLNEED) semantics fully. It will prefetch, but it will not pre-fault. You still gonna pay minor page fault on every new page access. There is MADV_POPULATE_READ, but it is synchronous.