[Bug 240061] MADV_FREE rewinds time to before fork()
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Sep 3 15:01:35 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240061
--- Comment #6 from Mark Johnston <markj at FreeBSD.org> ---
One possible alternative is to convert MADV_FREE to MADV_DONTNEED if the object
has a backing object. pmap_advise() needs to be updated to preserve the
modified bits, but this should be fine since vm_page_advise(MADV_FREE) calls
vm_page_undirty() anyway.
Some basic testing on my workstation showed that virtually all calls to
vm_object_madvise(MADV_FREE) are acting on an object with no backing object.
Obviously this may not be true in general.
# dtrace -n 'fbt::vm_object_madvise:entry /args[0] && args[3] ==
5/{@[args[0]->backing_object == NULL] = count();}'
^C
0 13
1 17504
Untested patch here: https://people.freebsd.org/~markj/patches/madvise_cow.diff
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list