mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
Optimize metaslab_set_selected_txg()
I don't think it makes much sense to choose for eviction between metaslabs selected in the same TXG. Considering that we also don't evict them for at least 32 TXG, the difference should be in a noise. Just skip the metaslab bumping if we already done it in this TXG. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rob Norris <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #18669
This commit is contained in:
1 parent
2ea519c2a5
commit
99ab859c38
1 file changed
+3
@@ -2854,6 +2854,9 @@ metaslab_set_selected_txg(metaslab_t *msp, uint64_t txg)
|
||||
{
|
||||
ASSERT(MUTEX_HELD(&msp->ms_lock));
|
||||
metaslab_class_t *mc = msp->ms_group->mg_class;
|
||||
if (msp->ms_selected_txg == txg &&
|
||||
multilist_link_active(&msp->ms_class_txg_node))
|
||||
return;
|
||||
multilist_sublist_t *mls =
|
||||
multilist_sublist_lock_obj(&mc->mc_metaslab_txg_list, msp);
|
||||
if (multilist_link_active(&msp->ms_class_txg_node))
|
||||
|
||||
Reference in new issue
Block a user