[Bug 230160] linuxulator doesn't implement madvise(MADV_DONTNEED) and any MADV_ flags with values >= 8 correctly
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jun 25 20:31:29 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230160
--- Comment #12 from commit-hook at freebsd.org ---
A commit references this bug:
Author: markj
Date: Thu Jun 25 20:30:31 UTC 2020
New revision: 362631
URL: https://svnweb.freebsd.org/changeset/base/362631
Log:
Implement an approximation of Linux MADV_DONTNEED semantics.
Linux MADV_DONTNEED is not advisory: it has side effects for anonymous
memory, and some system software depends on that. In particular,
MADV_DONTNEED causes anonymous pages to be discarded. If the mapping is
a private mapping of a named object then subsequent faults are to
repopulate the range from that object, otherwise pages will be
zero-filled. For mappings of non-anonymous objects, Linux MADV_DONTNEED
can be implemented in the same way as our MADV_DONTNEED.
This implementation differs from Linux semantics in its handling of
private mappings, inherited through fork(), of non-anonymous objects.
After applying MADV_DONTNEED, subsequent faults will repopulate the
mapping from the parent object rather than the root of the shadow chain.
PR: 230160
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25330
Changes:
head/sys/compat/linux/linux_mmap.c
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-emulation
mailing list