Page MenuHomeFreeBSD

vm_phys_avail_split(): Tolerate split requests at boundaries
Needs ReviewPublic

Authored by olce on Thu, Jan 23, 5:16 PM.

Details

Reviewers
markj
dougm
alc
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 61929
Build 58813: arc lint + arc unit