]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r320156, r320185, r320186, r320262, r320452, r321111:
authormav <mav@FreeBSD.org>
Thu, 27 Jul 2017 10:25:18 +0000 (10:25 +0000)
committermav <mav@FreeBSD.org>
Thu, 27 Jul 2017 10:25:18 +0000 (10:25 +0000)
commita0dddc24c905013363838bb04e79443d81a2d765
tree6919eef26445eb9c9ccb3c760b18432e9220f6f0
parent2ac0a2ca26121c0aa142f78767aeb8c6350e58ad
MFC r320156, r320185, r320186, r320262, r320452, r321111:
MFV r318946: 8021 ARC buf data scatter-ization

illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383
https://github.com/illumos/illumos-gate/commit/770499e185d15678ccb0be57ebc626ad1
8d93383

https://www.illumos.org/issues/8021
  The ARC buf data project (known simply as "ABD" since its genesis in the ZoL
  community) changes the way the ARC allocates `b_pdata` memory from using linea
r
  `void *` buffers to using scatter/gather lists of fixed-size 1KB chunks. This
  improves ZFS's performance by helping to defragment the address space occupied
  by the ARC, in particular for cases where compressed ARC is enabled. It could
  also ease future work to allocate pages directly from `segkpm` for minimal-
  overhead memory allocations, bypassing the `kmem` subsystem.
  This is essentially the same change as the one which recently landed in ZFS on
  Linux, although they made some platform-specific changes while adapting this
  work to their codebase:
  1. Implemented the equivalent of the `segkpm` suggestion for future work
  mentioned above to bypass issues that they've had with the Linux kernel memory
  allocator.
  2. Changed the internal representation of the ABD's scatter/gather list so it
  could be used to pass I/O directly into Linux block device drivers. (This
  feature is not available in the illumos block device interface yet.)

FreeBSD notes:
- the actual (default) chunk size is 4KB (despite the text above saying 1KB)
- we can try to reimplement ABDs, so that they are not permanently
  mapped into the KVA unless explicitly requested, especially on
  platforms with scarce KVA
- we can try to use unmapped I/O and avoid intermediate allocation of a
  linear, virtual memory mapped buffer
- we can try to avoid extra data copying by referring to chunks / pages
  in the original ABD

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Dan Kimmel <dan.kimmel@delphix.com>
41 files changed:
cddl/contrib/opensolaris/cmd/zdb/zdb.c
cddl/contrib/opensolaris/cmd/zdb/zdb_il.c
cddl/contrib/opensolaris/cmd/ztest/ztest.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c
sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h
sys/cddl/contrib/opensolaris/uts/common/Makefile.files
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c [new file with mode: 0644]
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h [new file with mode: 0644]
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c
sys/conf/files