Reviewed by: George Wilson <[email protected]>
Reviewed by: Serapheim Dimitropoulos <[email protected]>

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):

Upstream bug: DLPX-58547
You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/645

-- Commit Summary --

  * 9577 remove zfs_dbuf_evict_key tsd

-- File Changes --

    M usr/src/uts/common/fs/zfs/dbuf.c (69)
    M usr/src/uts/common/fs/zfs/dnode.c (7)
    M usr/src/uts/common/fs/zfs/dnode_sync.c (17)
    M usr/src/uts/common/fs/zfs/sys/dbuf.h (4)
    M usr/src/uts/common/fs/zfs/sys/dnode.h (4)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/645.patch
https://github.com/openzfs/openzfs/pull/645.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/645

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tb73a3d2cba6f4c23-M26c9e4cdb1064731fc1e6b11
Delivery options: https://openzfs.topicbox.com/groups

Reply via email to