FreeBSD src
Go to file
Olaf Faaland 4c5b89f59e Improved dnode allocation and dmu_hold_impl()
Refactor dmu_object_alloc_dnsize() and dnode_hold_impl() to simplify the
code, fix errors introduced by commit dbeb879 (PR #6117) interacting
badly with large dnodes, and improve performance.

* When allocating a new dnode in dmu_object_alloc_dnsize(), update the
percpu object ID for the core's metadnode chunk immediately.  This
eliminates most lock contention when taking the hold and creating the
dnode.

* Correct detection of the chunk boundary to work properly with large
dnodes.

* Separate the dmu_hold_impl() code for the FREE case from the code for
the ALLOCATED case to make it easier to read.

* Fully populate the dnode handle array immediately after reading a
block of the metadnode from disk.  Subsequently the dnode handle array
provides enough information to determine which dnode slots are in use
and which are free.

* Add several kstats to allow the behavior of the code to be examined.

* Verify dnode packing in large_dnode_008_pos.ksh.  Since the test is
purely creates, it should leave very few holes in the metadnode.

* Add test large_dnode_009_pos.ksh, which performs concurrent creates
and deletes, to complement existing test which does only creates.

With the above fixes, there is very little contention in a test of about
200,000 racing dnode allocations produced by tests 'large_dnode_008_pos'
and 'large_dnode_009_pos'.

name                            type data
dnode_hold_dbuf_hold            4    0
dnode_hold_dbuf_read            4    0
dnode_hold_alloc_hits           4    3804690
dnode_hold_alloc_misses         4    216
dnode_hold_alloc_interior       4    3
dnode_hold_alloc_lock_retry     4    0
dnode_hold_alloc_lock_misses    4    0
dnode_hold_alloc_type_none      4    0
dnode_hold_free_hits            4    203105
dnode_hold_free_misses          4    4
dnode_hold_free_lock_misses     4    0
dnode_hold_free_lock_retry      4    0
dnode_hold_free_overflow        4    0
dnode_hold_free_refcount        4    57
dnode_hold_free_txg             4    0
dnode_allocate                  4    203154
dnode_reallocate                4    0
dnode_buf_evict                 4    23918
dnode_alloc_next_chunk          4    4887
dnode_alloc_race                4    0
dnode_alloc_next_block          4    18

The performance is slightly improved for concurrent creates with
16+ threads, and unchanged for low thread counts.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #5396 
Closes #6522 
Closes #6414 
Closes #6564
2017-09-05 16:15:04 -07:00
.github Provide links to info about ZFS Buildbot options 2017-06-15 17:52:18 -07:00
cmd Improved dnode allocation and dmu_hold_impl() 2017-09-05 16:15:04 -07:00
config Implement --enable-debuginfo to force debuginfo 2017-08-29 13:16:24 -04:00
contrib dracut: make module-setup.sh shebang explicit 2017-08-14 10:56:04 -07:00
etc Add man page reference to systemd units 2017-09-05 13:50:35 -07:00
include Improved dnode allocation and dmu_hold_impl() 2017-09-05 16:15:04 -07:00
lib Retire send space estimation via ZFS_IOC_SEND 2017-08-31 09:00:35 -07:00
man zfs(8) manpage corrections 2017-09-05 13:45:18 -07:00
module Improved dnode allocation and dmu_hold_impl() 2017-09-05 16:15:04 -07:00
rpm Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
scripts zimport.sh: Allow custom pool create options 2017-08-21 10:00:12 -07:00
tests Improved dnode allocation and dmu_hold_impl() 2017-09-05 16:15:04 -07:00
udev Fix spelling 2017-01-03 11:31:18 -06:00
.gitignore Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
.gitmodules
AUTHORS
autogen.sh
configure.ac Implement --enable-debuginfo to force debuginfo 2017-08-29 13:16:24 -04:00
copy-builtin Allow c99 when building ZFS in the kernel tree 2017-03-27 12:31:15 -07:00
COPYRIGHT Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
DISCLAIMER
Makefile.am Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00
META Tag zfs-0.7.0 2017-07-26 10:13:25 -07:00
OPENSOLARIS.LICENSE
README.markdown Add CONTRIBUTING information and templates 2016-12-09 12:48:12 -07:00
TEST Retire filebench testing 2017-06-01 06:24:28 -07:00
zfs.release.in

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers. And it's native!

Official Resources

Installation

Full documentation for installing ZoL on your favorite Linux distribution can be found at our site.

Contribute & Develop

We have a separate document with contribution guidelines.