Date: Thu, 25 Jun 2020 20:31:29 +0000 From: bugzilla-noreply@freebsd.org To: emulation@FreeBSD.org Subject: [Bug 230160] linuxulator doesn't implement madvise(MADV_DONTNEED) and any MADV_ flags with values >= 8 correctly Message-ID: <bug-230160-4077-w19NsIOwS9@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-230160-4077@https.bugs.freebsd.org/bugzilla/> References: <bug-230160-4077@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230160 --- Comment #12 from commit-hook@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 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230160-4077-w19NsIOwS9>