opnsense-src/sys/vm
Doug Moore 8f58b69381 vm_grab_pages_unlocked: read all the pages at once
Define a function pctrie_lookup_range_unlocked, which looks up
consecutive elements in the pctrie, until a count limit is reached or
an item is discovered missing, and writes them into the first elements
of an array, returning the count of items found.  It does not require
a lock.  It uses an iterator, strictly between smr_enter and smr_exit,
when some of the nodes in the pctrie on entry may come to have only
one child, but none of them can be freed before exit.

Define a vm_radix interface to it for reading page ranges.

Change vm_page_grab_pages_unlocked to read all requested pages at
once, without relying on the existence of a linked list of pages.

Drop smr arguments from pctrie_iter_stride, since there's no smr
version in use.  Drop _pctrie_iter_lookup, since it isn't needed.

Reviewed by:	alc, kib, markj
Differential Revision:	https://reviews.freebsd.org/D47114
2025-04-29 01:28:32 -05:00
..
_vm_phys.h Revert "subr_pctrie: use ilog2(x) instead of fls(x)-1" 2024-06-03 13:07:42 -05:00
_vm_radix.h radix_trie: have vm_radix use pctrie code 2023-09-12 02:42:38 -05:00
device_pager.c device_pager: use VM_RADIX_FOREACH 2025-04-19 17:16:45 -05: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 vm_page: use iterators in page allocaction 2025-04-14 02:05:21 -05:00
pmap.h pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h 2024-06-06 08:15:08 +03:00
redzone.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07: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-03-13 18:09:35 +02:00
swap_pager.c vm_page: use iterators in page allocaction 2025-04-14 02:05:21 -05:00
swap_pager.h tmpfs_vnops: move swap work to swap_pager 2024-10-24 14:24:49 -05:00
uma.h Introduce the UMA_ZONE_NOTRIM uma zone type 2025-01-15 12:23:00 -05:00
uma_align_mask.h uma: Make the cache alignment mask unsigned 2023-11-02 09:30:03 -04:00
uma_core.c uma: Avoid excessive per-CPU draining 2025-03-17 20:12:58 +01:00
uma_dbg.c Fix build on powerpc after previous commit. 2023-11-09 21:21:47 -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 vm: Remove kernel stack swapping support, part 2 2024-07-29 01:38:39 +00:00
vm_domainset.c arm64: Support the L3 ATTR_CONTIGUOUS page size in pagesizes[] 2024-07-13 12:43:42 -05:00
vm_domainset.h Avoid waiting on physical allocations that can't possibly be satisfied 2023-12-23 23:01:40 -06:00
vm_dumpset.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vm_extern.h vm: Remove kernel stack swapping support, part 8 2024-07-29 01:43:59 +00:00
vm_fault.c vm_fault: use iterators in dontneed() 2025-04-26 13:08:01 -05:00
vm_glue.c vm_page: use iterators in page allocaction 2025-04-14 02:05:21 -05:00
vm_init.c vm: Assert that pagesizes[] is sorted 2024-08-04 14:53:15 -05:00
vm_kern.c vm_kern: in unback, init cursor while unlocked 2025-04-15 11:42:06 -05:00
vm_kern.h vm: Retire kmem_arena 2024-07-24 14:31:40 -05:00
vm_map.c vm_map: fix iterator jump size 2025-04-24 10:47:41 -05:00
vm_map.h vm/vm_map.h: drop vm_flags_t 2024-12-09 05:27:44 +02:00
vm_meter.c vm_meter: Fix laundry accounting 2024-10-22 12:48:43 +00:00
vm_mmap.c device_pager: Add cdev_pager_get_path to retrieve the "path" for an object 2025-03-27 16:44:33 -04:00
vm_object.c vm_object: use iterator in populate() 2025-04-24 19:09:09 -05:00
vm_object.h device_pager: Add cdev_pager_get_path to retrieve the "path" for an object 2025-03-27 16:44:33 -04:00
vm_page.c vm_grab_pages_unlocked: read all the pages at once 2025-04-29 01:28:32 -05:00
vm_page.h vm_page: drop find_least() 2025-04-26 13:09:24 -05:00
vm_pageout.c vm_pageout: Disallow invalid values for act_scan_laundry_weight 2025-04-18 17:56:52 +00:00
vm_pageout.h vm: Remove kernel stack swapping support, part 1 2024-07-29 01:38:21 +00:00
vm_pagequeue.h vm_page: Allow PG_NOFREE pages to be freed 2025-04-10 12:47:05 +00:00
vm_pager.c pbuf_ctor(): Stop using LK_NOWAIT, use LK_NOWITNESS 2024-05-26 10:20:52 -07:00
vm_pager.h device_pager: Add cdev_pager_get_path to retrieve the "path" for an object 2025-03-27 16:44:33 -04:00
vm_param.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
vm_phys.c vm_phys_early_startup(): Panic if phys_avail[] is empty 2025-02-19 15:13:27 +01:00
vm_phys.h vm_phys: reduce touching of page->pool fields 2025-01-29 03:13:17 -06:00
vm_radix.c uma: Deduplicate uma_small_alloc 2024-05-25 19:24:46 +02:00
vm_radix.h vm_grab_pages_unlocked: read all the pages at once 2025-04-29 01:28:32 -05:00
vm_reserv.c vm_reserv: find reservations with iterators 2025-04-20 14:52:53 -05:00
vm_reserv.h vm_reserv: find reservations with iterators 2025-04-20 14:52:53 -05:00
vm_swapout.c vm_swapout: use VM_RADIX_FOREACH 2025-04-18 14:48:55 -05:00
vm_unix.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vnode_pager.c vm_object: add getpages utility 2025-03-14 21:43:44 -05:00
vnode_pager.h Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00