]> granicus.if.org Git - zfs/commit
OpenZFS 8156 - dbuf_evict_notify() does not need dbuf_evict_lock
authorMatthew Ahrens <mahrens@delphix.com>
Tue, 28 Mar 2017 22:31:49 +0000 (15:31 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 9 Jun 2017 16:45:13 +0000 (09:45 -0700)
commit38240ebd7a35269e8ce74dc133b34120d707cd6f
tree73f3049cea30bbc878f33bc0af8c9b4ce02f9b15
parentdbeb8796996b4a342f7de2b3eb4ea5b86ac260f9
OpenZFS 8156 - dbuf_evict_notify() does not need dbuf_evict_lock

Authored by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
dbuf_evict_notify() holds the dbuf_evict_lock while checking if it should
do the eviction itself (because the evict thread is not able to keep up).
This can result in massive lock contention.  It isn't necessary to hold
the lock, because if we make the wrong choice occasionally, nothing bad
will happen. This commit results in a ~60% performance improvement for
ARC-cached sequential reads.

OpenZFS-issue: https://www.illumos.org/issues/8156
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/f73e5d9
Closes #6204
module/zfs/dbuf.c