From owner-svn-src-head@freebsd.org Fri Jun 23 03:10:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50F63D9AFF9; Fri, 23 Jun 2017 03:10:55 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 020CA75548; Fri, 23 Jun 2017 03:10:55 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id 16so26966405qkg.2; Thu, 22 Jun 2017 20:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=WgXlTUugd2c48sG1eCxUS/K2P+wLeOFGlHuN1D0uxSo=; b=JwIXDJM9NzMWg9l+vZ5myShZmNAHGgZWe0D1BxIglt+9sJR2Uoxpec7bNgkMDXYWcl pr/EcOerQgR3u680ZtlztHLv6osMzqx/BiyvZKEVwCDIt8lLavS0f6Ly/4WhVxcXVkhg YL73QpWMWRUkAv3bxsTKUiXlxoHnyQLkOqonxUBakwLfYijLS1CaIB/5RXjZ7pXoILf5 biKc7FZ4XBYwMou9vjOlMtP4Qu/FOq1VrPE3yTCzU01Uzn5biIQVrknkj5lK8dDAbvqE KazzJCryPszp2qI0gQljq1XKON0/gvvfkTbBa4Dyr4AYqMAGaob+uBAJCxmH6K031VtG MHcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=WgXlTUugd2c48sG1eCxUS/K2P+wLeOFGlHuN1D0uxSo=; b=O6hTfhFm4NHm4dNBkrxj5WCKUx81ETz9WfoDJEjJd14vdDP701MSAZpdGNMIIvUAOg nOQ9ZuhRBS0UwOpx5RodrnYqv1Tpk1u9O3I9xzJk3CpE3Mz9C3JTbT7r3boWECiwZJN1 sWl+XwD/OZgM1gpES9m10PqyZeH3X+hgTkI7UttlcbWcIVxz75zdLwdRDd802vG0XNaJ KHYlzxHTnuvCn2wzOqTiiW+i0WfkPhqM9o4Ba6EIXEFt2oQSg2jm3Z6uXBwDHYt0BVIF WwziBKp0YlE6/puhYbJb852qwvfReDQSX238t1Mj/4D+pyj6oBSdrH0ZpQzajiHRm/4W xtHQ== X-Gm-Message-State: AKS2vOyg603kEL0zG3dfL0qqSfMSAVNf+Y+fwNvLl40nUcdISNGw1xbi q/SmrJIVxyc2q/02pkmyuK1H/gdPTQ== X-Received: by 10.55.115.69 with SMTP id o66mr6550536qkc.120.1498187453693; Thu, 22 Jun 2017 20:10:53 -0700 (PDT) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.12.183.143 with HTTP; Thu, 22 Jun 2017 20:10:53 -0700 (PDT) In-Reply-To: <201706201739.v5KHdPhO051256@repo.freebsd.org> References: <201706201739.v5KHdPhO051256@repo.freebsd.org> From: Justin Hibbits Date: Thu, 22 Jun 2017 22:10:53 -0500 X-Google-Sender-Auth: D88dXkyy4s9_S5ZlhJfVg6xaltc Message-ID: Subject: Re: svn commit: r320156 - in head: cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contri... To: Andriy Gapon Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 03:10:55 -0000 Hi Andriy, On Tuesday, June 20, 2017, Andriy Gapon wrote: > Author: avg > Date: Tue Jun 20 17:39:24 2017 > New Revision: 320156 > URL: https://svnweb.freebsd.org/changeset/base/320156 > > Log: > MFV r318946: 8021 ARC buf data scatter-ization > > illumos/illumos-gate@770499e185d15678ccb0be57ebc626ad18d93383 > https://github.com/illumos/illumos-gate/commit/ > 770499e185d15678ccb0be57ebc626ad18d93383 > > 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 linear > `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 > Reviewed by: George Wilson > Reviewed by: Paul Dagnelie > Reviewed by: John Kennedy > Reviewed by: Prakash Surya > Reviewed by: Prashanth Sreenivasa > Reviewed by: Pavel Zakharov > Reviewed by: Chris Williamson > Approved by: Richard Lowe > Author: Dan Kimmel > > MFC after: 3 weeks > > Added: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > - copied, changed from r318946, vendor-sys/illumos/dist/uts/ > common/fs/zfs/abd.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h > - copied, changed from r318946, vendor-sys/illumos/dist/uts/ > common/fs/zfs/sys/abd.h > Modified: > head/cddl/contrib/opensolaris/cmd/zdb/zdb.c > head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c > head/cddl/contrib/opensolaris/cmd/ztest/ztest.c > head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c > head/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h > head/sys/cddl/contrib/opensolaris/uts/common/Makefile.files > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c > head/sys/conf/files > Directory Properties: > head/cddl/contrib/opensolaris/ (props changed) > head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) > head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) > head/sys/cddl/contrib/opensolaris/ (props changed) > > This commit breaks gcc builds with new warnings introduced: /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c: In function 'vdev_label_write_pad2': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c: In function 'arc_kmem_reap_now': /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:4364: warning: nested extern declaration of 'abd_chunk_cache' [-Wnested-externs] /home/chmeee/freebsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c:902: warning: passing argument 2 of 'abd_copy_from_buf' discards qualifiers from pointer target type - Justin