freebsd-dev/sys/dev/xen
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
..
balloon dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
blkback Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
blkfront Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
console tty: convert tty_lock_assert to tty_assert_locked to hide lock type 2020-04-17 18:34:49 +00:00
control Suspend all writeable local filesystems on power suspend. 2020-11-05 20:52:49 +00:00
debug
evtchn dev/xenstore: fix return with locks held 2020-05-20 11:01:10 +00:00
gntdev Convert allocations of the phys pager to vm_pager_allocate(). 2020-09-08 23:38:49 +00:00
grant_table dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
netback dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
netfront dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
pci
pcifront dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
privcmd Make page busy state deterministic on free. Pages must be xbusy when 2019-12-22 06:56:44 +00:00
pvcpu
timer
xenpci dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
xenstore dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00