Page MenuHomeFreeBSD

vm_phys_avail_split(): Tolerate split requests at boundaries
ClosedPublic

Authored by olce on Jan 23 2025, 5:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 16, 10:39 AM
Unknown Object (File)
Apr 26 2025, 9:42 PM
Unknown Object (File)
Apr 23 2025, 6:35 AM
Unknown Object (File)
Apr 23 2025, 6:04 AM
Unknown Object (File)
Apr 23 2025, 4:36 AM
Unknown Object (File)
Apr 23 2025, 4:34 AM
Unknown Object (File)
Apr 23 2025, 4:05 AM
Unknown Object (File)
Apr 8 2025, 7:29 PM
Subscribers

Details

Summary

Previously, such requests would lead to a panic. The only caller so far
(vm_phys_early_startup()) actually faces the case where some address can
be one of the chunk's boundaries and has to test it by hand. Moreover,
a later commit will introduce vm_phys_early_alloc_ex(), which will also
have to deal with such boundary cases.

Consequently, make this function handle boundaries by not splitting the
chunk and returning EJUSTRETURN instead of 0 to distinguish this case
from the "was split" result.

While here, expand the panic message when the address to split is not in
the passed chunk with available details.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable