HomeFreeBSD

Fixes for the DMU free throttle

Description

Fixes for the DMU free throttle

This patch fixes 2 issues with the DMU free throttle implemented
in dmu_free_long_range(). The first issue is that get_next_chunk()
was calculating the number of L1 blocks the free would dirty
incorrectly. In some cases involving extremely large files, this
code would greatly overestimate the number of effected L1 blocks,
causing excessive calls to txg_wait_open(). This patch corrects
the calculation.

The second issue is that the free throttle uses the total number
of free'd blocks in all (open, quiescing, and syncing) txgs to
determine whether to throttle. This causes large frees (such as
those created by the first issue) to cause 4 txg syncs before
any further frees were allowed to proceed. This patch ensures
that the accounting is done entirely in a per-txg fashion, so
that frees from a given txg don't affect those that immediately
follow it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8655

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Apr 25 2019, 5:16 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 25 2019, 5:16 PM
Parents
rG2b127afb44d1: Clarify and improve encryption documentation
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGf4c594da94d8: Fixes for the DMU free throttle (authored by Tom Caputi <tcaputi@datto.com>).Apr 25 2019, 5:16 PM