HomeFreeBSD

Conserve stack in dsl_scan_visitbp()

Description

Conserve stack in dsl_scan_visitbp()

The recursive call chain dsl_scan_visitbp() -> dsl_scan_recurse() ->
dsl_scan_visitdnode() -> dsl_scan_visitbp has been observed to consume
considerable stack resulting in a stack overflow (>8k). The cleanest
way I see to fix this with minimal impact to the existing flow of
code, and with the fewest performance concerns, is to always inline
dsl_scan_recurse() and dsl_scan_visitdnode(). While this will increase
the function size of dsl_scan_visitbp(), by 4660 bytes, it also reduces
the stack requirements by removing the function call overhead.

Issue #174

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Apr 22 2011, 5:12 PM
Parents
rG44e9e3479388: Merged pull request #212 from dajhorn/hostid.
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG7a060636b056: Conserve stack in dsl_scan_visitbp() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Apr 26 2011, 8:37 PM