summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPaul Dagnelie <[email protected]>2019-06-26 11:00:12 -0700
committerTony Hutter <[email protected]>2020-01-22 13:48:56 -0800
commit350646563fe7203cbc185acd25c12e16ea43f613 (patch)
treefd952c6c8ee65b6f627c2bbe4e4a3fd9d13368e8 /cmd
parentd47ee5ad1c554dd197366b3951922b9cc42b5804 (diff)
Concurrent small allocation defeats large allocation
With the new parallel allocators scheme, there is a possibility for a problem where two threads, allocating from the same allocator at the same time, conflict with each other. There are two primary cases to worry about. First, another thread working on another allocator activates the same metaslab that the first thread was trying to activate. This results in the first thread needing to go back and reselect a new metaslab, even though it may have waited a long time for this metaslab to load. Second, another thread working on the same allocator may have activated a different metaslab while the first thread was waiting for its metaslab to load. Both of these cases can cause the first thread to be significantly delayed in issuing its IOs. The second case can also cause metaslab load/unload churn; because the metaslab is loaded but not fully activated, we never set the selected_txg, which results in the metaslab being immediately unloaded again. This process can repeat many times, wasting disk and cpu resources. This is more likely to happen when the IO of the first thread is a larger one (like a ZIL write) and the other thread is doing a smaller write, because it is more likely to find an acceptable metaslab quickly. There are two primary changes. The first is to always proceed with the allocation when returning from metaslab_activate if we were preempted in either of the ways described in the previous section. The second change is to set the selected_txg before we do the call to activate so that even if the metaslab is not used for an allocation, we won't immediately attempt to unload it. Reviewed by: Jerry Jelinek <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Serapheim Dimitropoulos <[email protected]> Reviewed by: Brian Behlendorf <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> External-issue: DLPX-61314 Closes #8843
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions