]> git.proxmox.com Git - mirror_zfs.git/commit
OpenZFS 9577 - remove zfs_dbuf_evict_key tsd
authorMatthew Ahrens <mahrens@delphix.com>
Thu, 31 May 2018 17:29:12 +0000 (10:29 -0700)
committerTony Hutter <hutter2@llnl.gov>
Fri, 22 Feb 2019 17:47:34 +0000 (09:47 -0800)
commit01937958ce85b1cd8942dbaf9a3f9768c5b02a0a
tree6088c4891c92230b543e46ae50bc9c9392168c1f
parentedb504f9dbeb2921da2eb669ff052e11c8079e9d
OpenZFS 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.
3. 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):

Porting Notes:
* Minor conflict with OpenZFS 9337 which has not yet been ported.

Authored by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
OpenZFS-issue: https://illumos.org/issues/9577
OpenZFS-commit: https://github.com/openzfs/openzfs/pull/645
External-issue: DLPX-58547
Closes #7602
include/sys/dbuf.h
include/sys/dnode.h
module/zfs/dbuf.c
module/zfs/dnode.c
module/zfs/dnode_sync.c