HomeFreeBSD

Removing unneeded mutex for reading vq_pending_tree size

Description

Removing unneeded mutex for reading vq_pending_tree size

Locking mutex &vq->vq_lock in vdev_mirror_pending is unneeded:

  • no data is modified
  • only vq_pending_tree is read
  • in case garbage is returned (eg. vq_pending_tree being updated while the read is made) the worst case would be that a single read could be queued on a mirror side which more busy than thought

The benefit of this change is streamlining of the code path since
it is taken for *every* mirror member on *every* read.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1739

Details

Provenance
GregorKopka <mailfrom-github@kopka.net>Authored on Sep 19 2013, 2:42 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 25 2013, 10:29 PM
Parents
rG77831e17385b: Reduce the stack usage of dsl_dataset_remove_clones_key
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGf9f3f1ef983e: Removing unneeded mutex for reading vq_pending_tree size (authored by GregorKopka <mailfrom-github@kopka.net>).Sep 25 2013, 10:29 PM