freebsd-dev/sys/compat
Mark Johnston f4134e3d87 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
2020-06-25 20:30:30 +00:00
..
cloudabi vfs: track sequential reads and writes separately 2020-06-21 08:51:24 +00:00
cloudabi32 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
cloudabi64 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
freebsd32 Refactor ptrace() ABI compatibility. 2020-06-09 16:43:23 +00:00
ia32 Retire procfs-based process debugging. 2020-04-01 19:22:09 +00:00
lindebugfs LinuxKPI: Finalize move of lindebugfs from ports to base. 2019-05-19 15:44:21 +00:00
linprocfs fd: move vnodes out of filedesc into a dedicated structure 2020-03-01 21:53:46 +00:00
linsysfs Create a "drm" subdirectory for drm devices in linsysfs. Recent versions of 2019-09-23 12:27:55 +00:00
linux Implement an approximation of Linux MADV_DONTNEED semantics. 2020-06-25 20:30:30 +00:00
linuxkpi/common In r362552, RB_SET_PARENT is defined, and use in parens in 2020-06-23 22:47:54 +00:00
ndis Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netbsd
x86bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00