opnsense-src/sys/compat
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 2619c5ccfe1f7889f0241916bd17d06340142b05)

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 718d1928f874 ("LinuxKPI:
make linux_alloc_pages() honor __GFP_NORETRY") having been MFCed before
this one.
2025-10-23 08:18:48 +02:00
..
freebsd32 stat(2): add st_bsdflags field 2025-04-09 03:53:17 +03:00
ia32 sysentvec: add SV_SIGSYS flag 2023-10-09 06:24:31 +03:00
lindebugfs lindebugfs: use __func__ not __FUNCTION__ 2025-02-10 14:52:12 +00:00
linprocfs linprocfs: Correct sysfs /proc/<pid>/mountinfo entry 2025-03-31 10:42:48 -07:00
linsysfs linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux linux: Handle IP_RECVTOS cmsg type 2025-03-31 10:43:06 -07:00
linuxkpi Avoid waiting on physical allocations that can't possibly be satisfied 2025-10-23 08:18:48 +02:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00