freebsd-dev/sys/vm
Doug Moore 38f5cb1bfb radix_tree: redefine the clev field
The clev field in the node struct is almost always multiplied by
WIDTH; occasionally, it is incremented and then multiplied by
WIDTH. Instructions can be saved by storing it always multiplied by
WIDTH.

For the computation of slot(), this just eliminates a
multiplication. For trimkey(), where the caller always adds one to
clev before passing it as an argument, this change has the caller, not
the caller, do that. Trimkey() handles it not by adding WIDTH to the
input parameter, but by shifting COUNT, and not 1. That produces the
same result, and it relieves keybarr of the need to test to avoid
shifting by more than 63 bits, since level is always <= 63.

This takes 3 instrutions and 14 bytes out of the basic lookup loop on
amd64.

Reviewed by:	kib
Tested by:	pho (as part of a larger change)
Differential Revision:	https://reviews.freebsd.org/D41226
2023-07-30 01:20:07 -05:00
..
_vm_phys.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
_vm_radix.h Every path in a radix trie ends with a leaf or a NULL. By replacing 2023-07-28 11:39:52 -05:00
device_pager.c
memguard.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
memguard.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
phys_pager.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pmap.h
redzone.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
redzone.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
sg_pager.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
swap_pager.c vm: fix a number of functions to match the expected prototypes 2023-04-25 19:58:18 +02:00
swap_pager.h Make swap_pager_freespace() global 2022-12-09 14:15:37 +02:00
uma_core.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
uma_dbg.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
uma_dbg.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
uma_int.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
uma.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vm_domainset.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vm_domainset.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vm_dumpset.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vm_extern.h kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers. 2022-09-22 15:09:19 -07:00
vm_fault.c vm_fault: move FAULT_* return codes out of range for Mach errors 2023-06-28 00:03:14 +03:00
vm_glue.c vm: ansify 2023-02-13 18:23:21 +00:00
vm_init.c tslog: Annotate parts of SYSINIT cpu 2023-06-04 10:16:35 -07:00
vm_kern.c tslog: Annotate parts of SYSINIT cpu 2023-06-04 10:16:35 -07:00
vm_kern.h
vm_map.c vm: Fix vm_map_find_min() 2023-07-26 00:24:50 -05:00
vm_map.h mmap(MAP_STACK): on stack grow, use original protection 2023-07-20 17:11:42 +03:00
vm_meter.c vmmeter(): Fix detection of the named swap objects 2022-02-02 11:39:58 +02:00
vm_mmap.c vm_mmap_object: Update the spelling of true/false 2023-07-27 00:25:53 -05:00
vm_object.c vm_radix_init: use initializer 2023-07-14 01:49:55 -05:00
vm_object.h vm: add VM_OBJECT_UNLOCK 2023-03-11 11:08:21 +00:00
vm_page.c vm_phys: add binary segment search 2023-06-16 01:43:45 -05:00
vm_page.h vm_phys: add binary segment search 2023-06-16 01:43:45 -05:00
vm_pageout.c vm: reduce lock contention when processing vm batchqueues 2022-12-14 14:34:07 -05:00
vm_pageout.h protosw: retire pr_drain and use EVENTHANDLER(9) directly 2022-08-17 11:50:31 -07:00
vm_pagequeue.h vm: centralize VM_BATCHQUEUE_SIZE definition 2023-01-21 14:30:00 -05:00
vm_pager.c vm: fix a number of functions to match the expected prototypes 2023-04-25 19:58:18 +02:00
vm_pager.h vm_pager: add method to veto page allocation 2022-12-09 14:15:37 +02:00
vm_param.h
vm_phys.c vm_phys: Fix typo in 9e81742892 2023-06-16 03:12:42 -05:00
vm_phys.h vm_phys: add binary segment search 2023-06-16 01:43:45 -05:00
vm_radix.c radix_tree: redefine the clev field 2023-07-30 01:20:07 -05:00
vm_radix.h Every path in a radix trie ends with a leaf or a NULL. By replacing 2023-07-28 11:39:52 -05:00
vm_reserv.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vm_reserv.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vm_swapout_dummy.c
vm_swapout.c vm: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:20 -07:00
vm_unix.c
vm.h vm/vm.h: cleanup 2022-09-17 11:58:52 +03:00
vnode_pager.c vnode_pager_input: return runningbufspace back 2023-03-26 00:55:29 +02:00
vnode_pager.h