3 ms·
From the paper. > and subsequently allow the kernel to immediately reuse the associated physical memory. On Linux, this can be achieved by passing the MADV_DON
by gbrown_ 7y ago
From the paper.
> and subsequently allow the kernel to immediately reuse the associated physical memory. On Linux, this can be achieved by passing the MADV_DONTNEED flag to the the madvise system call.
Shouldn't this be MADV_FREE? This instantly reminded me of this classic Bryan Cantrill talk https://youtu.be/bg6-LVCHmGM?t=3529 https://youtu.be/bg6-LVCHmGM?t=3529
Edit: It seems that the Linux behavior is relied upon? From later in the paper.
> Note that it is even legal for a page to be unloaded while the page con-tent is being read optimistically. This is possible since the virtual memory region reserved for a buffer frame always remains valid (see above), and read accesses to a memory region that was marked with the MADV_DONTNEED flag simply result in zero bytes. No additional physical memory is allocated in this case, as all such accesses are mapped to the same zero page