diff options
author | Alan Cox <alc@FreeBSD.org> | 2023-05-29 06:01:37 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2023-05-29 16:22:55 +0000 |
commit | 3e7e2bb2467e8bb682176125397168c88c3913c6 (patch) | |
tree | 018f6027100409862f82c8ea0a6f29b8b3f1cfcb /share/man/man4 | |
parent | 8792c03886d9e6df10fbac825819603dc059c7ea (diff) | |
download | src-main.tar.gz src-main.zip |
The prior implementation of VM_PAGE_TO_PV_LIST_LOCK() performed a
linear-time search of the vm_phys_segs[] array. However, in contrast to
PHYS_TO_PV_LIST_LOCK(), that search is unnecessary because every (non-
fictitious) vm_page contains the index of the vm_phys_seg in which it
resides.
Change most of the remaining uses of CHANGE_PV_LIST_LOCK_TO_PHYS() and
PHYS_TO_PV_LIST_LOCK() to CHANGE_PV_LIST_LOCK_TO_VM_PAGE() and
VM_PAGE_TO_PV_LIST_LOCK(), respectively.
Collectively, these changes also reduce the size of a GENERIC-NODEBUG
kernel's pmap.
Before:
text data bss dec hex filename
70144 3200 2248 75592 0x12748 pmap.o
After:
text data bss dec hex filename
69192 3200 2248 74640 0x12390 pmap.o
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D40306
Diffstat (limited to 'share/man/man4')
0 files changed, 0 insertions, 0 deletions