3 ms·
Wouldn't that be canceled by the read fault? (there's also usually a write, unless the allocation-head-metadata is on a different page than the parts of the al
by o11c 3y ago
Wouldn't that be canceled by the read fault?
(there's also usually a write, unless the allocation-head-metadata is on a different page than the parts of the allocation you're acting spooky with)
Edit: after watching the video elsewhere in thread, it was indeed crossing page boundary, but that behavior has to be a kernel bug since the documentation says "accesses" are sufficient to repopulate it.
- jcranmer 3y agoNo, it's specifically a write that causes the page to actually be freed. Per the man page: > However, subsequent writes to pages in the range will succeed and then kernel cannot free those dirtied pages, so that the caller can always see just written data. If there is no subsequent write, the kernel can free the pages at any time. Once pages in the range have been freed, the caller will see zero-fill-on-demand pages upon subsequent page references.
- o11c 3y agoAh, I mixed up MADV_DONTNEED (which is older) with MADV_FREE.