Reduce stack by inlining spa_impl_load
The spa_load function may call itself recursively through the spa_load_impl function. This call path of spa_load-> spa_load_impl->spa_load->spa_load_impl takes 640 bytes of stack. By forcing spa_load_impl to be inlined as part of spa_load the can be reduced to 448 bytes, for a savings of 192 bytes,
This commit is contained in:
parent
a8a452d74b
commit
ca5262f030
|
@ -1652,7 +1652,8 @@ spa_load(spa_t *spa, spa_load_state_t state, spa_import_type_t type,
|
|||
* Load an existing storage pool, using the pool's builtin spa_config as a
|
||||
* source of configuration information.
|
||||
*/
|
||||
static int
|
||||
__attribute__((always_inline))
|
||||
static inline int
|
||||
spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
|
||||
spa_load_state_t state, spa_import_type_t type, boolean_t mosconfig,
|
||||
char **ereport)
|
||||
|
|
Loading…
Reference in New Issue