Page MenuHomeFreeBSD

Let vm_map_link handle new entries that clip old ones
AbandonedPublic

Authored by dougm on May 23 2019, 2:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 10:30 PM
Unknown Object (File)
Jan 27 2024, 11:54 AM
Unknown Object (File)
Dec 20 2023, 7:57 AM
Unknown Object (File)
Dec 19 2023, 4:30 PM
Unknown Object (File)
Dec 19 2023, 1:02 PM
Unknown Object (File)
Sep 18 2023, 3:04 AM
Unknown Object (File)
Jul 15 2023, 10:13 PM
Unknown Object (File)
Jun 30 2023, 7:37 PM
Subscribers
None

Details

Reviewers
None
Summary

Where we currently clip an entry by manipulating its start or end fields, and then link in a new entry that abuts the modified one, stop modifying the old one and let the link function handle the clipping. That way, the invariants that define the max_free field of the entries of the map hold on entry and on exit to functions that manipulate the map.

Tested by: pho

Test Plan

Peter Holm has tested a patch that includes these changes.

This change compiles:

make vm_map.o

cc -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.vm_map.o -MTvm_map.o -fdebug-prefix-map=./machine=/freebsd/base/head/sys/amd64/include -fdebug-prefix-map=./x86=/freebsd/base/head/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -Dprintf=freebsd_kprintf -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror ../../../vm/vm_map.c
ctfconvert -L VERSION -g vm_map.o

Kernel built, and booted.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped