]> git.proxmox.com Git - mirror_zfs.git/commit
Remove fastwrite mutex
authorRichard Yao <richard.yao@clusterhq.com>
Tue, 28 Jul 2015 14:22:56 +0000 (10:22 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Jan 2016 23:38:35 +0000 (15:38 -0800)
commitb10695c8f1ce317cd24d99af7998741a35a5ce48
treee75355476113384705fbcfb7e121ad667d851228
parentc96c36fa22ab97f6b3025b356bfca8d9e030d002
Remove fastwrite mutex

The fast write mutex is intended to protect accounting, but it is
redundant because all accounting is performed through atomic operations.
It also serializes all metaslab IO behind a mutex, which introduces a
theoretical scaling regression that the Illumos developers did not like
when we showed this to them. Removing it makes the selection of the
metaslab_group lock free as it is on Illumos. The selection is not quite
the same without the lock because the loop races with IO completions,
but any imbalances caused by this are likely to be corrected by
subsequent metaslab group selections.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3643
include/sys/metaslab_impl.h
module/zfs/metaslab.c