freebsd-skq/sys/fs
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
..
autofs Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
cd9660 Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
cuse Fix for loading cuse.ko via rc.d . Make sure we declare the cuse(3) 2020-10-23 08:44:53 +00:00
deadfs cache: fix vexec panic when racing against vgone 2020-10-09 19:10:00 +00:00
devfs fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
ext2fs Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
fdescfs fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
fifofs fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
fuse Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
mntfs Add a new "mntfs" pseudo file system which provides private device vnodes for 2020-03-06 18:41:37 +00:00
msdosfs Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
nfs nfs: Mark unused statistics variable as reserved 2020-11-18 04:35:49 +00:00
nfsclient vfs: drop the de facto curthread argument from VOP_INACTIVE 2020-10-20 07:19:03 +00:00
nfsserver Bjorn reported a problem where the Linux NFSv4.1 client is 2020-09-26 23:05:38 +00:00
nullfs nullfs: provide custom bypass for VOP_READ_PGCACHE(). 2020-11-26 18:16:32 +00:00
procfs fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
pseudofs Add sbuf streaming mode to pseudofs(9), use in linprocfs(5) 2020-11-05 06:48:51 +00:00
smbfs vfs: drop the de facto curthread argument from VOP_INACTIVE 2020-10-20 07:19:03 +00:00
tmpfs tmpfs: reorder struct tmpfs_node to shrink it by 8 bytes 2020-11-05 11:24:45 +00:00
udf Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
unionfs Split out cwd/root/jail, cmask state from filedesc table 2020-11-17 21:14:13 +00:00