aboutsummaryrefslogtreecommitdiffstats
path: root/include/thread_pool.h
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2018-10-31 09:58:17 -0700
committerBrian Behlendorf <[email protected]>2018-10-31 11:58:17 -0500
commit9553c533a635bf39697b0b54f4751580f6d2590d (patch)
tree22fe6a12294e8f4f5333c795ff93626df71b019d /include/thread_pool.h
parent82c0a050fcaa50c2d35e562858fa5c95e05caecd (diff)
bpobj_enqueue_subobj() should copy small subobj's
When we delete a snapshot, we consolidate some bpobj's together because we no longer need to keep their entries in separate buckets. This is done in constant time by including the "sub" bpobj by reference in the parent bpobj. After many snapshots have been deleted, we may have many sub-bpobj's. Usually, most sub-bpobj's don't contain many BP's. Compared to this small payload, the sub-bpobj is relatively heavyweight since it is a object in the MOS. A common scenario on a long-lived pool is for the vast majority of MOS objects to be small sub-bpobj's. To improve this situation, when consolidating bpobj's together, bpobj_enqueue_subobj() can copy the contents of small bpobj's into the parent, and then delete the enqueued bpobj, rather than including it by reference. Since this copying is limited in size (to one block), the consolidation is still constant time, though with a larger constant due to reading in the one block of the enqueued bpobj. This idea and mechanism are similar to how we handle "sub-subobj's". When including a sub-bpobj by reference, if the sub-bpobj itself has less than a block of sub-sub-bpobj's, the list of sub-sub-bpobj's is copied to the parent bpobj's list of sub-bpobj's. Reviewed-by: Serapheim Dimitropoulos <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Zuchowski <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #8053 Issue #7908
Diffstat (limited to 'include/thread_pool.h')
0 files changed, 0 insertions, 0 deletions