Skip to content
ZFS on Linux - the official OpenZFS implementation for Linux.
Branch: master
Clone or download
amotin and behlendorf Minimize aggsum_compare(&arc_size, arc_c) calls.
For busy ARC situation when arc_size close to arc_c is desired.  But
then it is quite likely that aggsum_compare(&arc_size, arc_c) will need
to flush per-CPU buckets to find exact comparison result.  Doing that
often in a hot path penalizes whole idea of aggsum usage there, since it
replaces few simple atomic additions with dozens of lock acquisitions.

Replacing aggsum_compare() with aggsum_upper_bound() in code increasing
arc_p when ARC is growing (arc_size < arc_c) according to PMC profiles
allows to save ~5% of CPU time in aggsum code during sequential write
to 12 ZVOLs with 16KB block size on large dual-socket system.

I suppose there some minor arc_p behavior change due to lower precision
of the new code, but I don't think it is a big deal, since it should
affect only very small window in time (aggsum buckets are flushed every
second) and in ARC size (buckets are limited to 10 average ARC blocks
per CPU).

Reviewed-by: Chris Dunlop <>
Reviewed-by: Richard Elling <>
Reviewed-by: George Melikov <>
Reviewed-by: Allan Jude <>
Reviewed-by: Brian Behlendorf <>
Signed-off-by:  Alexander Motin <>
Closes #8901
Latest commit c1b5801 Jun 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update CONTRIBUTING to point users to IRC as well as mailing list Mar 13, 2019
cmd make zil max block size tunable Jun 10, 2019
config Python config cleanup Jun 13, 2019
contrib If $ZFS_BOOTFS contains guid, replace the guid portion with $pool Jun 6, 2019
etc Fix zfs-mount-generator for datasets with spaces May 7, 2019
include lz4_decompress_abd declared but not defined Jun 13, 2019
lib Restrict filesystem creation if name referred either '.' or '..' Jun 13, 2019
man panic in removal_remap test on 4K devices Jun 13, 2019
module Minimize aggsum_compare(&arc_size, arc_c) calls. Jun 14, 2019
rpm Add diffutils dependency for dkms build Feb 20, 2019
scripts Fix %post and %postun generation in kmodtool Jun 10, 2019
tests Restrict filesystem creation if name referred either '.' or '..' Jun 13, 2019
udev Add enclosure_symlinks option to vdev_id Dec 15, 2018
.gitignore git ignore python 3.7 virtual environment directories Mar 25, 2019
.gitmodules Add compatibility test script Feb 21, 2014
.travis.yml Add .travis.yml Nov 13, 2017
AUTHORS Update build system and packaging May 29, 2018 Add Apr 30, 2019
COPYRIGHT Update build system and packaging May 29, 2018
LICENSE Update build system and packaging May 29, 2018
META Tag 0.8.0 May 21, 2019 zfs-tests: fix warnings when packaging some .shlib files May 24, 2019
NEWS Add NEWS file Sep 18, 2018
NOTICE Update build system and packaging May 29, 2018 Explicitly state supported Linux versions May 31, 2018
TEST Update build system and packaging May 29, 2018 Cause to fail if autoreconf fails Jul 6, 2018 Add TRIM support Mar 29, 2019
copy-builtin Allow copy-builtin to work with modified sources Oct 17, 2018 Move zfs.release generation to configure step Jul 12, 2012


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

codecov coverity

Official Resources


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.


ZFS on Linux is released under a CDDL license.
For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels

  • The META file contains the officially recognized supported kernel versions.
You can’t perform that action at this time.