a3fd9d9e noreply Nov. 30, 2016, 11:18 p.m.
In multiple cases zio_buf_alloc() was used instead of kmem_alloc()
or vmem_alloc().  This was often done because the allocations
could be large and it was easy to use zfs_buf_alloc() for them.

But this isn't ideal for allocations which are small or short
lived.  In these cases it is better to use kmem_alloc() or
vmem_alloc().  If possible we want to avoid the case where
we have slabs allocated for kmem caches which are rarely used.

Note for small allocations vmem_alloc() will be internally
converted to kmem_alloc().  Therefore as long as large
allocations are infrequent and short lived the penalty for
using vmem_alloc() is small.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5409
ebc7f2b8 gjb Nov. 30, 2016, 10 p.m.
Requested by:	antoine
Differential Revision:	https://reviews.freebsd.org/D8120 (related)
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
58a639b7 cem Nov. 30, 2016, 9:59 p.m.
Fix ioat_release to only set is_completion_pending if DMAs were actually
queued.  Otherwise, the spurious flag could trigger an assert in the
reset path on INVARIANTS kernels.

Reviewed by:	bdrewery, Suraj Raju @ Isilon
Sponsored by:	Dell EMC Isilon
cgit ViewVC
7657defc noreply Nov. 30, 2016, 9:48 p.m.
ZFS currently uses ARC buffers which are backed by virtual memory.
While functional, there are some major problems with this approach
which can be observed on all OpenZFS platforms.  ABD was designed
to address these issues and includes contributions from OpenZFS
developers from multiple platforms.

While all OpenZFS platforms will benefit from ABD this functionality
is critical for Linux.  Unlike the other OpenZFS platforms the Linux
kernel discourages extensive use of virtual memory.  The provided
interfaces are not optimized for frequent allocations from the virtual
address space.  To maintain good performance a kmem cache is
used which contains relatively long lived slabs backed by virtual
memory.  The downside to the approach is that those slabs can
become highly fragmented resulting in an inefficient use of memory.

Another issue is that on 32-bit systems the available virtual
address space in the kernel is only a small fraction of total
system memory.  This means the ARC size is highly constrained
which hurts performance and make allocating memory difficult
and OOMs more likely.

ABD is designed to address these issues by using scatter lists
of pages for data buffers.  This removes the need for slabs
which resolves the fragmentation issue.  It also allows high
memory pages to be allocated which alleviates the virtual
address space pressure on 32-bit systems.

For metadata buffers, which are small, linear ABDs are allocated
from the slab.  This is preferable because there are many places
in the code which expect to be able to read from a given offset
in the buffer.  Using linear ABDs means none of that code needs
to be modified.  The majority of these buffers are allocated with
kmalloc so there's minimal impact of the virtual address space.

Tested-by: Kash Pande <kash@tripleback.net>
Tested-by: kernelOfTruth <kerneloftruth@gmail.com>
Tested-by: RageLtMan <rageltman@sempervictus>
Tested-by: DHE <git@dehacked.net>
Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed-by: David Quigley <david.quigley@intel.com>
Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3441 
Closes #5135
26e28783 dim Nov. 30, 2016, 7:06 p.m.
Any .debug or .symbols files under /usr/lib/debug which correspond to
OLD_FILES entries in ObsoleteFiles.inc are also automatically cleaned up
by the delete-old target.  Make this also apply to any OLD_DIRS entries.

Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D8683
cgit ViewVC
dc521a58 vangyzen Nov. 30, 2016, 6:34 p.m.
This was needed on stable/10.  Apparently, sys/param.h supplies CHAR_MAX
on head.  Include limits.h anyway, for consistency, and because C says so.

Sponsored by:	Dell EMC
cgit ViewVC
ce43e88d behlendorf1 Nov. 30, 2016, 6:27 p.m.
This script was disabled as the avail/used space changed slightly.
Add sync_pool() and a short delay after snapshots are created to
ensure everything in flight has been written.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: ChaoyuZhang <zhang.chaoyu@zte.com.cn>
Closes #5201 
Closes #5419
2d44b04b behlendorf1 Nov. 30, 2016, 5:48 p.m.
CID 154591: Incorrect expression (SIZEOF_MISMATCH)

Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5435
a54b7de0 andrew Nov. 30, 2016, 2:18 p.m.
recurse into itself.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
d2314cb3 andrew Nov. 30, 2016, 2:17 p.m.
function may not exist when FDT is removed from the kernel.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
f534f01f rwatson Nov. 30, 2016, 2:02 p.m.
when au_user_mask() fails, it's not a failure to set the audit mask,
but to calculate the audit mask -- and hence a condfiguration-file
issue (of some sort).

MFC after:	3 days
Sponsored by:	DARPA, AFRL
cgit ViewVC
2daeee1a andrew Nov. 30, 2016, 10:17 a.m.
alpine_serdes_resource_get which is defined in an FDT only file.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
c430fbd3 andrew Nov. 30, 2016, 9:47 a.m.
This allows the driver to be built in a kernel with no FDT support, e.g.
on arm64 with just ACPI.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
59202261 andrew Nov. 30, 2016, 9:45 a.m.
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
b6fe583c mav Nov. 30, 2016, 9:27 a.m.
It is quite specific mode of operation without storing on-disk metadata.
It can be useful in some cases in combination with some external control
tools handling mirror creation and disks hot-plug.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
cgit ViewVC