opnsense-src/sys/compat/linux
Konstantin Belousov cd85379104 Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from
MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.

Make b_pages[] array in struct buf flexible.  Size b_pages[] for buffer
cache buffers exactly to atop(maxbcachebuf) (currently it is sized to
atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1.
The +1 for pbufs allow several pbuf consumers, among them vmapbuf(),
to use unaligned buffers still sized to maxphys, esp. when such
buffers come from userspace (*).  Overall, we save significant amount
of otherwise wasted memory in b_pages[] for buffer cache buffers,
while bumping MAXPHYS to desired high value.

Eliminate all direct uses of the MAXPHYS constant in kernel and driver
sources, except a place which initialize maxphys.  Some random (and
arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted
straight.  Some drivers, which use MAXPHYS to size embeded structures,
get private MAXPHYS-like constant; their convertion is out of scope
for this work.

Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs,
dev/siis, where either submitted by, or based on changes by mav.

Suggested by: mav (*)
Reviewed by:	imp, mav, imp, mckusick, scottl (intermediate versions)
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D27225
2020-11-28 12:12:51 +00:00
..
check_error.d Switch linuxulator to use the native 1:1 threads. 2015-05-24 14:53:16 +00:00
check_internal_locks.d Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux.c linuxolator: implement memfd_create syscall 2020-06-29 03:09:14 +00:00
linux.h linux(4): Improve netlink diagnostics 2020-11-03 19:50:42 +00:00
linux_common.c Linuxolator: Replace use of eventhandlers by sysent hooks. 2020-11-23 18:18:16 +00:00
linux_common.h Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions 2019-05-13 17:48:16 +00:00
linux_dtrace.h sys/compat: further adoption of SPDX licensing ID tags. 2017-11-27 15:13:23 +00:00
linux_dummy.c linux(4): Implement name_to_handle_at(), open_by_handle_at() 2020-11-17 19:51:47 +00:00
linux_emul.c Linuxolator: Replace use of eventhandlers by sysent hooks. 2020-11-23 18:18:16 +00:00
linux_emul.h Linuxolator: Replace use of eventhandlers by sysent hooks. 2020-11-23 18:18:16 +00:00
linux_errno.c Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. 2020-11-04 19:54:18 +00:00
linux_errno.h Unbreak buildworld after r367339. 2020-11-04 21:39:04 +00:00
linux_errno.inc Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. 2020-11-04 19:54:18 +00:00
linux_event.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_event.h Linux epoll: Register events with zero event mask 2019-11-24 20:47:40 +00:00
linux_file.c linux(4): Implement name_to_handle_at(), open_by_handle_at() 2020-11-17 19:51:47 +00:00
linux_file.h linux(4): Implement name_to_handle_at(), open_by_handle_at() 2020-11-17 19:51:47 +00:00
linux_fork.c linux(4) clone(2): Correctly handle CLONE_FS and CLONE_FILES 2020-11-17 21:20:11 +00:00
linux_futex.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_futex.h linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
linux_getcwd.c cache: drop the always curthread argument from reverse lookup routines 2020-08-24 08:57:02 +00:00
linux_ioctl.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
linux_ioctl.h linux(4): Quiesce unrecognized ioctl warning for F2FS query 2020-11-02 18:45:43 +00:00
linux_ipc.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_ipc.h Update syscall.master to 5.0. 2019-03-24 14:50:02 +00:00
linux_ipc64.h Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux_mib.c - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_mib.h Add compat.linux.dummy_rlimits, and disable by default. 2020-10-18 15:58:16 +00:00
linux_misc.c linux(4): Fix loadable modules after r367395 2020-11-06 22:04:57 +00:00
linux_misc.h linux(4) prctl(2): Implement PR_[GS]ET_DUMPABLE 2020-11-03 02:10:54 +00:00
linux_mmap.c linux(4): Quiesce warning about madvise(..., -1) 2020-10-30 19:02:59 +00:00
linux_mmap.h Add linux_madvise(2) instead of having Linux apps call the native 2020-06-20 18:29:22 +00:00
linux_persona.h Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux_signal.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_signal.h Rationalize license text on Linuxolator files 2018-03-23 14:39:34 +00:00
linux_socket.c unix(4): Enhance LOCAL_CREDS_PERSISTENT ABI 2020-11-17 20:01:21 +00:00
linux_socket.h - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_stats.c Fix potential race condition in linux stat(2). 2020-10-20 17:19:10 +00:00
linux_sysctl.c Quiet unused fn warning for linuxulator w/o legacy syscalls 2018-06-25 19:24:50 +00:00
linux_sysproto.h sys/compat: further adoption of SPDX licensing ID tags. 2017-11-27 15:13:23 +00:00
linux_time.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_timer.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_timer.h Centralize compatability translation macros. 2020-04-14 20:30:48 +00:00
linux_uid16.c linux: add sysctl compat.linux.use_emul_path 2020-08-18 22:04:22 +00:00
linux_util.c - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_util.h - add more linux socket options (sorted by value) 2020-11-08 09:50:58 +00:00
linux_vdso.c compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
linux_vdso.h Avoid using [LINUX_]SHAREDPAGE constant directly in the vdso code. 2017-07-30 21:24:20 +00:00
linux_videodev2_compat.h Commit the missing linux_videdev2_compat.h (lost somewhere between 2011-05-04 13:09:20 +00:00
linux_videodev_compat.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00
stats_timing.d Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
trace_futexes.d Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00