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)
Wed, Dec 10, 7:38 PM
Unknown Object (File)
Thu, Dec 4, 11:44 PM
Unknown Object (File)
Tue, Nov 25, 7:59 AM
Unknown Object (File)
Mon, Nov 24, 12:32 AM
Unknown Object (File)
Tue, Nov 18, 6:45 AM
Unknown Object (File)
Sat, Nov 15, 3:27 PM
Unknown Object (File)
Sat, Nov 15, 4:26 AM
Unknown Object (File)
Fri, Nov 14, 9:17 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