Go to file
Giuseppe Di Natale 45d1abc74d Improved dnode allocation and dmu_hold_impl() (#6611)
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>
2017-09-13 15:46:15 -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() (#6611) 2017-09-13 15:46:15 -07:00
config Linux 4.8+ compatibility fix for vm stats 2017-09-13 14:21:59 -07:00
contrib dracut: Install commands required for vdev_id 2017-08-07 09:37:30 -07:00
etc Disable mount(8) canonical paths in do_mount() 2017-08-21 16:46:55 -07:00
include Improved dnode allocation and dmu_hold_impl() (#6611) 2017-09-13 15:46:15 -07:00
lib Disable mount(8) canonical paths in do_mount() 2017-08-21 16:46:55 -07:00
man vdev_id: implement slot numbering by port id 2017-08-21 16:41:22 -07:00
module Improved dnode allocation and dmu_hold_impl() (#6611) 2017-09-13 15:46:15 -07:00
rpm Tag zfs-0.7.1 2017-08-08 13:14:32 -07:00
scripts Multi-modifier protection (MMP) 2017-07-13 13:54:00 -04:00
tests Improved dnode allocation and dmu_hold_impl() (#6611) 2017-09-13 15:46:15 -07:00
udev Fix spelling 2017-01-03 11:31:18 -06:00
.gitignore Improve gitignore 2017-05-25 10:14:13 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
copy-builtin Allow c99 when building ZFS in the kernel tree 2017-03-27 12:31:15 -07:00
COPYRIGHT Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
Makefile.am Prebaked scripts for zpool status/iostat -c 2017-04-21 09:27:04 -07:00
META Tag zfs-0.7.1 2017-08-08 13:14:32 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
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-script-config.sh.in zpool iostat/status -c improvements 2017-06-05 10:52:15 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

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.