HomeFreeBSD

9577 remove zfs_dbuf_evict_key tsd

Description

9577 remove zfs_dbuf_evict_key tsd

The zfs_dbuf_evict_key TSD (thread-specific data) is not necessary - we can
instead pass a flag down in a few places to prevent recursive dbuf eviction.
Making this change has 3 benefits:

  1. The code semantics are easier to understand.
  2. On Linux, performance is improved, because creating/removing TSD values

(by setting to NULL vs non-NULL) is expensive, and we do it very often.

  1. According to Nexenta, the current semantics can cause a deadlock when

concurrently calling dmu_objset_evict_dbufs() (which is rare today, but they
are working on a "parallel unmount" change that triggers this more easily)

illumos/illumos-gate@c2919acbea007fa95c709b60d073db9a24526e01

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

Details

Provenance
mavAuthored on
Reviewer
matthew
Parents
rS337209: MFV r337208: 9591 ms_shift can be incorrectly changed in MOS config for
Branches
Unknown
Tags
Unknown