opnsense-src/sys/dev
Jason A. Harmening 64f4e2bdf5 Avoid waiting on physical allocations that can't possibly be satisfied
- Change vm_page_reclaim_contig[_domain] to return an errno instead
  of a boolean.  0 indicates a successful reclaim, ENOMEM indicates
  lack of available memory to reclaim, with any other error (currently
  only ERANGE) indicating that reclamation is impossible for the
  specified address range.  Change all callers to only follow
  up with vm_page_wait* in the ENOMEM case.

- Introduce vm_domainset_iter_ignore(), which marks the specified
  domain as unavailable for further use by the iterator.  Use this
  function to ignore domains that can't possibly satisfy a physical
  allocation request.  Since WAITOK allocations run the iterators
  repeatedly, this avoids the possibility of infinitely spinning
  in domain iteration if no available domain can satisfy the
  allocation request.

PR:		274252
Reported by:	kevans
Tested by:	kevans
Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D42706

(cherry picked from commit 2619c5ccfe)

MFCed as a prerequisite for further MFC of VM domainset changes.  Based
on analysis, it would not hurt, and I have been using it in productions
for months now.

Resolved the trivial conflict due to commit 718d1928f8 ("LinuxKPI:
make linux_alloc_pages() honor __GFP_NORETRY") having been MFCed before
this one.
2025-10-23 08:18:48 +02:00
..
aac
aacraid
acpi_support acpi_asus_wmi(4): Handle TUF-specific hotkeys internally 2025-04-30 10:32:22 +03:00
acpica acpi_pci: Use pci_has_pm and pci_clear_pme 2025-04-29 10:45:14 -04:00
adb Use bus_generic_detach directly instead of a wrapper 2025-02-27 12:08:57 -05:00
adlink
ae dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
age dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
agp agp: Set the driver-specific field correctly 2024-09-05 13:44:03 +00:00
ahci Add some AMD device IDs. 2024-09-25 09:17:26 -04:00
aic7xxx
al_eth al_eth: improve TCP LRO 2024-10-31 12:19:40 +01:00
alc dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
ale dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
alpm
altera altera: Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:19 +08:00
amd_ecc_inject
amdgpio
amdpm
amdsbwd amdsbwd: Use device_set_descf() 2024-06-27 11:27:41 -04:00
amdsmb
amdsmn amdsmn(4), amdtemp(4): add support for Zen 5 2025-01-19 02:24:58 +02:00
amdtemp amdsmn(4), amdtemp(4): add support for Zen 5 2025-01-19 02:24:58 +02:00
arcmsr
asmc asmc: Add support for MacbookPro11,4 2024-09-20 11:39:16 +00:00
ata
ath ath(4): Fix a typo in a source code comment 2025-05-01 08:48:16 +02:00
atkbdc
atopcase
axgbe axgbe: add support for Yellow Carp Ethernet device 2025-07-09 10:05:50 +02:00
backlight
bce net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
beri kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
bfe net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
bge IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
bhnd bhnd: Remove orphaned driver for the BHND USB core 2025-02-27 08:09:23 -05:00
bnxt bnxt: Fix the request length in bnxt_hwrm_func_backing_store_cfg() 2025-10-06 17:01:22 +02:00
bwi
bwn
bxe IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
cadence net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
cardbus pci: Clear active PME# and disable PME# generation 2025-04-29 10:44:25 -04:00
cas cas(4): Stop checking for failures from taskqueue_create_fast(M_WAITOK) 2024-09-30 12:44:29 +08:00
cesa
cfe
cfi cfi: Use device_set_descf() 2024-06-27 11:27:41 -04:00
chromebook_platform
ciss
clk/xilinx
coretemp
cpuctl
cpufreq
cxgb cxgb(4): Use routines from pci(9) instead of hand rolled equivalents. 2025-04-22 04:12:45 -07:00
cxgbe cxgbe(4): Add two new transceiver types. 2025-04-22 04:12:46 -07:00
cyapa kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
dc net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
dcons
dialog/da9063
dpaa sys: Set the type of allocated bus resources 2025-02-27 08:09:23 -05:00
dpaa2 dpaa2_mc: Check for error the first time bus_generic_detach is called 2025-02-27 10:17:57 -05:00
dpms
drm2 Avoid waiting on physical allocations that can't possibly be satisfied 2025-10-23 08:18:48 +02:00
dwc IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
dwwdt Check for errors when detaching children first, not last 2025-02-27 10:17:49 -05:00
e1000 e1000: Fix some issues in em_newitr() 2025-07-09 10:05:44 +02:00
efidev efirt: add a tunable to disable printing faults during EFIRT calls 2025-04-09 03:53:17 +03:00
ena ena: Bump driver version to v2.8.1 2025-05-01 17:51:52 +00:00
enetc libkern: add ilog2 macro 2025-02-10 04:27:12 -06:00
enic enic: Remove a stray semicolon 2024-10-31 12:40:17 +08:00
eqos IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
et net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
etherswitch etherswitch: Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:21 +08:00
evdev kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
exca
extres
fb
fdc
fdt Check for errors when detaching children first, not last 2025-02-27 10:17:49 -05:00
ffec if_ffec: fix MAC address bootverbose print 2024-10-30 17:49:45 -07:00
filemon
firewire Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
firmware sys: Use the new arm_smccc_invoke macros 2024-10-21 15:03:27 +00:00
flash flexspi: Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:22 +08:00
ftgpio
ftwd
fxp IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
gem net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
glxiic
glxsb
goldfish
gpio bytgpio: expose PNP info 2025-03-25 19:28:38 -06:00
gve gve: Add feature to change TX/RX ring size 2025-04-18 13:52:10 +00:00
hdmi
hid hidraw(4): Force switch to hidraw mode on HIDIOCGRDESC ioctl 2025-04-30 10:32:23 +03:00
hifn hifn/safe: Remove dummy calls to bus_generic_detach 2025-02-27 10:18:05 -05:00
hpt27xx hpt27xx(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:22 +08:00
hptiop hptiop: Use device_set_descf() 2024-07-21 20:55:27 -04:00
hptmv
hptnr hptnr(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:23 +08:00
hptrr hptrr: Better error recovery 2025-02-18 16:59:44 -07:00
hwpmc hwpmc: Restore line lost in previous commit 2024-11-30 19:56:10 -05:00
hyperv hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare() 2025-04-15 02:25:24 +00:00
iavf pci: Don't cache the count of MSI/MSI-X messages before allocation 2025-04-29 10:24:32 -04:00
ic
ice ice(4): Fix a typo in a source code comment 2025-09-08 10:24:33 +02:00
ichiic ig4(4): Add Intel ACPI HID 2025-04-30 10:32:22 +03:00
ichsmb Add smbus and i2c device IDs for Meteor Lake 2024-10-17 12:32:38 -04:00
ichwd
ida
igc igc: Fix some issues in igc_neweitr() 2025-07-09 10:05:45 +02:00
iicbus Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
imcsmb
intel
intpm
io
ioat
iommu iommu_gas_map_region(): add comment explaining the ma array shift 2025-04-04 03:54:06 +03:00
ipmi ipmi: fix runtime on powerpc64le 2025-04-03 12:21:38 +02:00
ips
ipw
irdma
isci isci(4): Fix a typo in a source code comment 2024-12-31 10:32:43 +01:00
iscsi
iser iser(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:23 +08:00
isl
ismt
isp isp: Fix abort issue introduced by previous commit 2025-01-14 21:48:41 -05:00
ispfw
itwd
iwi
iwm
iwn
ixgbe ixgbe: Correct ixgbe_link_speed_to_str comment 2025-10-07 12:10:05 +02:00
ixl ixl(4): Fix queue MSI and legacy IRQ rearming 2025-10-06 17:16:44 +02:00
jedec_dimm jedec_dimm: Use device_set_descf() 2024-06-27 11:27:42 -04:00
jme dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
kbd
kbdmux
ksyms
kvm_clock
le net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
led
lge net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
liquidio liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK) 2024-09-30 12:44:30 +08:00
mailbox/arm
malo
mana mana: remove redundant doorbell in mana_poll_rx_cq() 2025-03-18 04:53:56 +00:00
mbox
md md: Merge two switch statements in mdstart_vnode 2024-11-30 08:55:57 -05:00
mdio Use bus_generic_detach directly instead of a wrapper 2025-02-27 12:08:57 -05:00
mem
mfi mfi(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:24 +08:00
mgb Canonicalize the name of the FreeBSD Foundation 2025-02-19 09:58:47 -05:00
mge net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
mii mii_fdt: Search for the "ethernet-ports" subnode 2024-12-03 01:01:59 +00:00
mlx mlx(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:24 +08:00
mlx4 mlx4ib(4): Fix some typos in device messages 2025-02-10 07:54:24 +01:00
mlx5 mlx5en: Use connector type instead of cable type for media detection 2025-04-16 04:41:49 +03:00
mlxfw
mmc mmc: Use bus_topo_lock and taskqueue_bus while adding/removing child devices 2025-04-29 10:40:47 -04:00
mmcnull
mpi3mr mpi3mr: modified the log messages to be on a single line 2025-04-30 11:05:54 -06:00
mpr mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_INIT 2024-10-16 08:19:21 -06:00
mps mps/mpr: Add workaround for firmware not responding to IOC_FACTS or IOC_INIT 2024-10-16 08:19:21 -06:00
mpt
mrsas mrsas(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:25 +08:00
msk msk/sk: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
mthca
mvs
mwl net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw 2025-02-10 14:52:08 +00:00
mxge mxge(4): Stop checking for failures from taskqueue_create(M_WAITOK) 2024-09-30 12:44:30 +08:00
my bpf: Add IfAPI analogue for bpf_peers_present() 2024-09-24 12:30:48 +08:00
nctgpio
ncthwm
neta neta: improve TCP LRO 2024-10-31 12:18:52 +01:00
netmap vtnet, ptnet: include opt_*.h files early 2025-09-08 10:25:23 +02:00
nfe IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
nfsmb
nge dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
nmdm
ntb IfAPI: Retire if_etherbpfmtap() and if_bpfmtap() 2025-09-08 10:26:04 +02:00
null
nvd
nvdimm nvdimm: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
nvme nvme: Fix hotplug on one of the amazon platforms 2025-03-30 16:44:57 -07:00
nvram
oce Revert "oce(4): deprecate" 2025-02-04 08:38:09 -05:00
ocs_fc ocs_fc: Remove a stray semicolon 2024-10-31 12:40:18 +08:00
ofw ofw_pcib: Use bus_generic_rman_* 2025-02-27 08:09:20 -05:00
otus
ow ow: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
p2sb
pbio
pccard
pccbb
pcf
pci pcib: Clear any pending slot status events during attach 2025-04-29 10:46:40 -04:00
pms pms(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:25 +08:00
powermac_nvram
ppbus Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
ppc
proto
psci sys: Use the new arm_smccc_invoke macros 2024-10-21 15:03:27 +00:00
pst
pty
puc uart: Add support for Brainboxes / Intashield serial cards. 2025-01-11 17:09:41 +09:00
pwm
qat qat: add disable safe dc mode for QAT SPR devices 2025-07-09 10:05:45 +02:00
qat_c2xxx
qcom_clk
qcom_dwc3
qcom_gcc
qcom_mdio
qcom_qup
qcom_rnd random: Make random_source definitions const 2025-10-06 17:18:32 +02:00
qcom_tcsr
qcom_tlmm
qlnx log2: move log2 functions from linuxkpi to libkern 2025-02-10 04:29:23 -06:00
qlxgb net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
qlxgbe net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
qlxge net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
quicc
ral
random random: Make random_source definitions const 2025-10-06 17:18:32 +02:00
rccgpio
re if_re: Add PNP info for module 2025-10-06 17:17:39 +02:00
rl dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
rndtest
rtsx mmc: Use bus_topo_lock and taskqueue_bus while adding/removing child devices 2025-04-29 10:40:47 -04:00
rtwn rtwn: Add device ID for TPLink RTL8192CU 2024-12-04 13:35:12 -05:00
safe hifn/safe: Remove dummy calls to bus_generic_detach 2025-02-27 10:18:05 -05:00
safexcel
sbni net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
scc
sdhci sdhci: Use bus_topo_lock and taskqueue_bus for hotplug events 2025-04-29 10:42:44 -04:00
sdio sdiodevs: add more vendors and devices 2024-10-09 19:18:43 +00:00
sec
sff Remove bogus detach routines 2024-11-30 21:46:07 -05:00
sfxge sfxge: defer ether_ifattach to when ifmedia_init is done 2024-12-23 15:00:19 -07:00
sge net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
siis
sis dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
sk msk/sk: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
smartpqi smartpqi(4): Fix a typo in a source code comment 2025-01-29 06:55:53 +01:00
smbios smbios: style(9): smbios_cksum() 2025-04-08 15:38:25 +02:00
smbus Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
smc net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
snp
sound sound: Terminate stream properly when closing vchans 2025-05-30 00:51:30 +02:00
speaker speaker: Use standard C bool 2024-11-30 08:55:57 -05:00
spibus spibus: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:07 -05:00
sram
ste dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
stge net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
sume sume(4): Stop checking for failures from malloc(M_WAITOK) 2024-09-30 12:44:26 +08:00
superio superio: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
sym
syscons Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
tcp_log
tdfx
ti net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
tpm tpm: Register TPM as entropy source 2024-09-06 22:13:14 -07:00
tsec net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
tws
uart uart: Add support for Brainboxes / Intashield serial cards. 2025-01-11 17:09:41 +09:00
usb hidraw(4): Add additional hidraw input/output report ioctls 2025-04-30 10:32:22 +03:00
veriexec
vge dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
viapm
viawd
video
videomode
virtio vtnet: Do not compare boolean with integer 2025-10-10 13:35:36 +02:00
vkbd Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
vmd acpi/pci/vmd: Fix a nit with nested resource mapping requests 2025-02-27 08:09:23 -05:00
vmgenc
vmware pvscsi: Explicitly mask out CTS_SAS_VALID_SPEED bit 2025-01-20 18:14:43 +08:00
vnic net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
vr dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
vt vt: add comments for KDMKTONE ioctl implementation 2024-11-04 08:54:10 -05:00
vte net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
watchdog
wbwd wbwd: Use device_set_descf() 2024-06-27 11:27:41 -04:00
wdatwd
wg kern: wg: add support for removing Allowed-IPs 2025-07-28 10:12:19 +02:00
wpi
wtap
xdma
xen x86/xen: fix accounted interrupt time 2025-07-09 10:05:48 +02:00
xilinx net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
xl dev: Use recently added improvements to PME# support to simplify drivers 2025-04-29 10:45:07 -04:00
xz
zlib