freebsd-dev/sys/dev/virtio
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 virtio: clean up empty lines in .c and .h files 2020-09-01 21:31:26 +00:00
block Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
console virtio: clean up empty lines in .c and .h files 2020-09-01 21:31:26 +00:00
mmio Only write to VIRTIO_MMIO_GUEST_PAGE_SIZE with virtio mmio version 1 2020-07-21 14:25:36 +00:00
network virtio: clean up empty lines in .c and .h files 2020-09-01 21:31:26 +00:00
pci virtio: fix mips regression introduced by r357596 2020-07-28 11:23:37 +00:00
random virtio: Support MMIO bus for all devices 2020-05-06 23:31:30 +00:00
scsi Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
virtio_bus_if.m
virtio_config.h
virtio_ids.h
virtio_if.m
virtio_ring.h
virtio.c virtio: clean up empty lines in .c and .h files 2020-09-01 21:31:26 +00:00
virtio.h virtio(4): Add PNP match metadata for virtio devices 2019-06-04 02:37:11 +00:00
virtqueue.c virtio: Support non-legacy network device and queue 2020-06-08 21:51:36 +00:00
virtqueue.h