cd85379104
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 |
||
---|---|---|
.. | ||
files.jz4780 | ||
files.x1000 | ||
jz4780_aic.c | ||
jz4780_aic.h | ||
jz4780_clk_gen.c | ||
jz4780_clk_otg.c | ||
jz4780_clk_pll.c | ||
jz4780_clk.h | ||
jz4780_clock.c | ||
jz4780_clock.h | ||
jz4780_codec.c | ||
jz4780_codec.h | ||
jz4780_common.h | ||
jz4780_cpuregs.h | ||
jz4780_dme.c | ||
jz4780_dwc_fdt.c | ||
jz4780_efuse.c | ||
jz4780_ehci.c | ||
jz4780_gpio_if.m | ||
jz4780_gpio.c | ||
jz4780_intr.c | ||
jz4780_lcd.c | ||
jz4780_lcd.h | ||
jz4780_machdep.c | ||
jz4780_mmc.c | ||
jz4780_mp.c | ||
jz4780_mpboot.S | ||
jz4780_nand.c | ||
jz4780_nemc.c | ||
jz4780_ohci.c | ||
jz4780_pdma.c | ||
jz4780_pdma.h | ||
jz4780_pinctrl.c | ||
jz4780_pinctrl.h | ||
jz4780_regs.h | ||
jz4780_rtc.c | ||
jz4780_smb.c | ||
jz4780_smb.h | ||
jz4780_timer.c | ||
jz4780_uart.c |