Page MenuHomeFreeBSD

[PowerPC64] fix crash when using machdep.moea64_bpvo_pool_size tunable
ClosedPublic

Authored by alfredo on Jan 17 2020, 2:03 PM.
Referenced Files
F169611255: D23233.id66909.diff
Wed, Sep 2, 1:41 AM
F169515162: D23233.diff
Tue, Sep 1, 7:00 PM
Unknown Object (File)
Mon, Aug 31, 3:00 PM
Unknown Object (File)
Mon, Aug 31, 1:42 AM
Unknown Object (File)
Mon, Aug 31, 1:28 AM
Unknown Object (File)
Sun, Aug 30, 7:18 PM
Unknown Object (File)
Wed, Aug 19, 4:19 PM
Unknown Object (File)
Wed, Aug 19, 2:12 PM
Subscribers

Details

Summary

This fixes kernel crashing when tunable "machdep.moea64_bpvo_pool_size" is set to a value higher then 327680 (default value).
Function moea64_mid_bootstrap() relies on moea64_bpvo_pool_size, but at time of the use the variable wan't yet updated with the new value provided by user.

Problem was detected after trying to use a VM with 64GB of RAM, and default moea64_bpvo_pool_size is insufficient (kernel boot used more than 470000) .
I think default value must be discussed to address this use case, or find a way to calculate pool size automatically based on amount of memory detected.

Test Plan

Tested on QEMU VM with 64GB of RAM using "set machdep.moea64_bpvo_pool_size=655360" on loader prompt

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/powerpc/aim/mmu_oea64.c
917 ↗(On Diff #66909)

Having this here, shouldn't you delete the TUNABLE_INT() above on line 188?

This revision was not accepted when it landed; it landed in state Needs Review.Jan 19 2020, 9:18 PM
This revision was automatically updated to reflect the committed changes.