opnsense-src/sys/vm
Olivier Certner f3983aeb62
vm_page_startup(): Clarify memory lowest, highest and size computation
Change the comment before this block of code, and separate the latter
from the preceding one by an empty line.

Move the loop on phys_avail[] to compute the minimum and maximum memory
physical addresses closer to the initialization of 'low_avail' and
'high_avail', so that it's immediately clear why the loop starts at
2 (and remove the related comment).

While here, fuse the additional loop in the VM_PHYSSEG_DENSE case that
is used to compute the exact physical memory size.

This change suppresses one occurence of detecting whether at least one
of VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE is defined at compile time, but
there is still another one in PHYS_TO_VM_PAGE().

Reviewed by:    markj
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48632

(cherry picked from commit 16317a174a5288f0377f8d40421b5c7821d57ac2)
2025-04-08 15:38:22 +02:00
..
_vm_phys.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
_vm_radix.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
device_pager.c device_pager: rename the un_pager.devp.dev field to handle 2024-11-13 01:19:18 +02:00
memguard.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
memguard.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
phys_pager.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pmap.h pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h 2024-07-01 13:07:38 +00:00
redzone.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
redzone.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sg_pager.c Add sysctl kern.proc.kqueue 2025-04-07 04:28:20 +03:00
swap_pager.c swap_pager: Ensure that swapoff puts swapped-in pages in page queues 2024-11-28 14:38:17 +00:00
swap_pager.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
uma.h uma: Permit specifying max of cache line and some custom alignment 2023-11-16 10:07:18 -05:00
uma_align_mask.h uma: Make the cache alignment mask unsigned 2023-11-16 10:07:16 -05:00
uma_core.c uma: Avoid excessive per-CPU draining 2025-03-31 18:35:33 +00:00
uma_dbg.c uma: Micro-optimize memory trashing 2023-12-08 21:32:43 -05:00
uma_dbg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
uma_int.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_domainset.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vm_domainset.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_dumpset.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_extern.h vm: Add kva_alloc_aligned 2024-09-02 08:43:18 +00:00
vm_fault.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vm_glue.c thread: Simplify sanitizer integration with thread creation 2025-02-07 14:46:53 +00:00
vm_init.c Adjust comments referencing vm_mem_init() 2024-06-06 11:23:01 -03:00
vm_kern.c vm: Add kva_alloc_aligned 2024-09-02 08:43:18 +00:00
vm_kern.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_map.c vm_map: add vm_map_find_locked(9) 2024-10-05 10:08:54 +03:00
vm_map.h vm_map: add vm_map_find_locked(9) 2024-10-05 10:08:54 +03:00
vm_meter.c vm_meter: Fix laundry accounting 2024-10-29 13:04:25 +00:00
vm_mmap.c vm_object: do not assume that un_pager.devp.dev is cdev 2024-11-13 01:19:18 +02:00
vm_object.c vm_object: do not assume that un_pager.devp.dev is cdev 2024-11-13 01:19:18 +02:00
vm_object.h vm_object: do not assume that un_pager.devp.dev is cdev 2024-11-13 01:19:18 +02:00
vm_page.c vm_page_startup(): Clarify memory lowest, highest and size computation 2025-04-08 15:38:22 +02:00
vm_page.h vm_page_free_pages_toq(): return the count of freed pages 2024-10-05 10:08:56 +03:00
vm_pageout.c vm_pageout: Add a chicken switch for multithreaded PQ_INACTIVE scanning 2025-01-23 13:58:07 +00:00
vm_pageout.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_pagequeue.h vm_pageout: Add a chicken switch for multithreaded PQ_INACTIVE scanning 2025-01-23 13:58:07 +00:00
vm_pager.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vm_pager.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
vm_param.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_phys.c vm_phys_early_startup(): Panic if phys_avail[] is empty 2025-04-08 15:38:22 +02:00
vm_phys.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_radix.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vm_radix.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_reserv.c vm_reserv_reclaim_contig: Return NULL not false 2024-04-17 10:33:26 -04:00
vm_reserv.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_swapout.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vm_swapout_dummy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vm_unix.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
vnode_pager.c buf: Add a runningbufclaim() helper 2024-12-06 14:51:09 +00:00
vnode_pager.h Add vnode_pager_clean_{a,}sync(9) 2024-01-18 02:51:33 +02:00