]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFV 312436
Josh Paetzel [Fri, 20 Jan 2017 15:01:04 +0000 (15:01 +0000)]
MFV 312436

 6569 large file delete can starve out write ops

  illumos/illumos-gate@ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6
  https://github.com/illumos/illumos-gate/commit/ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6

  https://www.illumos.org/issues/6569
    The core issue I've found is that there is no throttle for how many
    deletes get assigned to one TXG. As a results when deleting large files
    we end up filling consecutive TXGs with deletes/frees, then write
    throttling other (more important) ops.

    There is an easy test case for this problem. Try deleting several
    large files (at least 1/2 TB) while you do write ops on the same
    pool. What we've seen is performance of these write ops (let's
    call it sideload I/O) would drop to zero.

    More specifically the problem is that dmu_free_long_range_impl()
    can/will fill up all of the dirty data in the pool "instantly",
    before many of the sideload ops can get in. So sideload
    performance will be impacted until all the files are freed.

    The solution we have tested at Nexenta (with positive results)
    creates a relatively simple throttle for how many "free" ops we let
    into one TXG.

    However this solution exposes other problems that should also be
    addressed. If we are to slow down freeing of data that means one
    has to wait even longer (assuming vnode ref count of 1) to get shell
    back after an rm or for NFS thread to finish the free-ing op.
    To avoid this the proposed solution is to call zfs_inactive() async
    for "large" files. Async freeing then begs for the reclaimed space
    to be accounted for in the zpool's "freeing" prop.

    The other issue with having a longer delete is the inability to
    export/unmount for a longer period of time. The proposed solution
    is to interrupt freeing of blocks when a fs is unmounted.

  Author: Alek Pinchuk <alek@nexenta.com>
  Reviewed by: Matt Ahrens <mahrens@delphix.com>
  Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
  Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
  Approved by: Dan McDonald <danmcd@omniti.com>

Reviewed by: avg
Differential Revision: D9008

7 years agoANSYfy kern_ktrace.c and remove archaic register keyword
Ed Maste [Fri, 20 Jan 2017 14:59:56 +0000 (14:59 +0000)]
ANSYfy kern_ktrace.c and remove archaic register keyword

Sponsored by: The FreeBSD Foundation

7 years agoReport disk addition errors on `add` or `create` subcommand.
Alexander Motin [Fri, 20 Jan 2017 13:49:04 +0000 (13:49 +0000)]
Report disk addition errors on `add` or `create` subcommand.

MFC after: 1 week

7 years agodon't abort writing of a core dump after EFAULT
Andriy Gapon [Fri, 20 Jan 2017 13:39:07 +0000 (13:39 +0000)]
don't abort writing of a core dump after EFAULT

It's possible to get EFAULT when writing a segment backed by a file
if the segment extends beyond the file.
The core dump could still be useful if we skip the rest of the segment
and proceed to other segements.
The skipped segment (or a portion of it) will be zero-filled.

While there, use 'const' to signify that core_write() only reads the
buffer and use __DECONST before calling vn_rdwr_inchunks() because it
can be used for both reading and writing.

Before the change:
kernel: Failed to write core file for process mmap_trunc_core (error 14)
kernel: pid 77718 (mmap_trunc_core), uid 1001: exited on signal 6

After the change:
kernel: Failed to fully fault in a core file segment at VA 0x800645000 with size 0x4000 to be written at offset 0x29000 for process mmap_trunc_core
kernel: pid 4901 (mmap_trunc_core), uid 1001: exited on signal 6 (core dumped)

Reviewed by: julian, kib
Obtained from: Panzura (older version of the change)
MFC after: 5 days
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D9233

7 years agovmm_dev: work around a bogus error with gcc 6.3.0
Andriy Gapon [Fri, 20 Jan 2017 13:21:27 +0000 (13:21 +0000)]
vmm_dev: work around a bogus error with gcc 6.3.0

The error is:
vmm_dev.c: In function 'alloc_memseg':
vmm_dev.c:261:11: error: null argument where non-null required (argument 1) [-Werror=nonnull]

Apparently, the gcc is unable to figure out that if a ternary operator
produced a non-NULL value once, then the operator with exactly the same
operands would produce the same value again.

MFC after: 1 week

7 years agoMake draining a sendqueue more robust.
Hans Petter Selasky [Fri, 20 Jan 2017 12:02:40 +0000 (12:02 +0000)]
Make draining a sendqueue more robust.

Add own state variable to track if a sendqueue is stopped or not.
This will prevent traffic from entering the sendqueue while it is
being destroyed.

Update drain function to wait for traffic to be transmitted before
returning when the link state is active.

Add extra checks in transmit path for stopped SQ's.

While at it:
- Use likely() for a mbuf pointer check.
- Remove redundant IFF_DRV_RUNNING check.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoAdd runtime support for modifying the SQ and RQ completion event
Hans Petter Selasky [Fri, 20 Jan 2017 11:11:49 +0000 (11:11 +0000)]
Add runtime support for modifying the SQ and RQ completion event
moderation mode. The presence of this feature is indicated through the
firmware capabilities.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoUpdate firmware interface structures and definitions adding support
Hans Petter Selasky [Fri, 20 Jan 2017 10:47:32 +0000 (10:47 +0000)]
Update firmware interface structures and definitions adding support
for new features and commands.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoAdd some basic -s flag testcases for cut(1)
Enji Cooper [Fri, 20 Jan 2017 08:00:36 +0000 (08:00 +0000)]
Add some basic -s flag testcases for cut(1)

The remaining functionality seems to be covered in one form or
another via the NetBSD ATF testcase.

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years ago[net80211] allow for MCS16-23 to be statically configured.
Adrian Chadd [Fri, 20 Jan 2017 07:43:40 +0000 (07:43 +0000)]
[net80211] allow for MCS16-23 to be statically configured.

Tested:

* AR9380, STA mode

7 years agoAdd testcases for -i with hardlinks and symlinks
Enji Cooper [Fri, 20 Jan 2017 07:11:21 +0000 (07:11 +0000)]
Add testcases for -i with hardlinks and symlinks

The symlink testcase is expected to fail, post-r312519 (the revert of
r312404); mark it so.

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoIntegrate contrib/netbsd-tests/usr.bin/sed/t_sed.sh into the FreeBSD test
Enji Cooper [Fri, 20 Jan 2017 06:47:02 +0000 (06:47 +0000)]
Integrate contrib/netbsd-tests/usr.bin/sed/t_sed.sh into the FreeBSD test
suite as usr.bin/sed/sed_test

Don't expect :emptybackref to fail -- it succeeds on FreeBSD

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoRevert r312404 as we need to do an exp-run and fix existing ports that
Xin LI [Fri, 20 Jan 2017 06:45:06 +0000 (06:45 +0000)]
Revert r312404 as we need to do an exp-run and fix existing ports that
rely on the previous behavior.

Requested by: antonie (portmgr)

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 05:51:25 +0000 (05:51 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 05:45:07 +0000 (05:45 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse .CURDIR:H instead of .CURDIR to simplify pathing in output, etc
Enji Cooper [Fri, 20 Jan 2017 04:55:14 +0000 (04:55 +0000)]
Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:54:21 +0000 (04:54 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:54:09 +0000 (04:54 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:53:50 +0000 (04:53 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:53:45 +0000 (04:53 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:53:40 +0000 (04:53 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:53:26 +0000 (04:53 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:53:20 +0000 (04:53 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:53:00 +0000 (04:53 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:52:29 +0000 (04:52 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:52:00 +0000 (04:52 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:51:36 +0000 (04:51 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:50:46 +0000 (04:50 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:50:19 +0000 (04:50 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
Enji Cooper [Fri, 20 Jan 2017 04:46:20 +0000 (04:46 +0000)]
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:45:09 +0000 (04:45 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:43:21 +0000 (04:43 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:42:43 +0000 (04:42 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:42:11 +0000 (04:42 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:41:53 +0000 (04:41 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:40:55 +0000 (04:40 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:40:10 +0000 (04:40 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:39:36 +0000 (04:39 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
Enji Cooper [Fri, 20 Jan 2017 04:38:54 +0000 (04:38 +0000)]
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:37:22 +0000 (04:37 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:37:03 +0000 (04:37 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:36:48 +0000 (04:36 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:36:28 +0000 (04:36 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:36:06 +0000 (04:36 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:35:49 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:35:36 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:35:18 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:35:00 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:34:34 +0000 (04:34 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:34:01 +0000 (04:34 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:33:45 +0000 (04:33 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:33:20 +0000 (04:33 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:32:36 +0000 (04:32 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:32:19 +0000 (04:32 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:31:19 +0000 (04:31 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:30:05 +0000 (04:30 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:29:23 +0000 (04:29 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:29:05 +0000 (04:29 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:28:41 +0000 (04:28 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:28:16 +0000 (04:28 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
Enji Cooper [Fri, 20 Jan 2017 04:27:40 +0000 (04:27 +0000)]
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:04:25 +0000 (04:04 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 04:03:55 +0000 (04:03 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:59:10 +0000 (03:59 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:58:50 +0000 (03:58 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:57:52 +0000 (03:57 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:57:24 +0000 (03:57 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:56:42 +0000 (03:56 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:56:10 +0000 (03:56 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:55:43 +0000 (03:55 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:55:21 +0000 (03:55 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:54:36 +0000 (03:54 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths
Enji Cooper [Fri, 20 Jan 2017 03:52:16 +0000 (03:52 +0000)]
Use SRCTOP-relative paths and .CURDIR with :H instead of ".." specified paths

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:34:59 +0000 (03:34 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after:    3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:31:50 +0000 (03:31 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Fri, 20 Jan 2017 03:27:47 +0000 (03:27 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This implifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agoReplace dot-dot relative pathing with SRCTOP-relative paths where possible
Enji Cooper [Fri, 20 Jan 2017 03:23:24 +0000 (03:23 +0000)]
Replace dot-dot relative pathing with SRCTOP-relative paths where possible

This reduces build output, need for recalculating paths, and makes it clearer
which paths are relative to what areas in the source tree. The change in
performance over a locally mounted UFS filesystem was negligible in my testing,
but this may more positively impact other filesystems like NFS.

LIBC_SRCTOP was left alone so Juniper (and other users) can continue to
manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as
include Makefiles with custom options.

Discussed with: marcel, sjg
MFC after: 1 week
Reviewed by: emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9207

7 years agoRemove obsolete /usr/lib/debug/usr/lib/private dir
Ed Maste [Fri, 20 Jan 2017 03:14:18 +0000 (03:14 +0000)]
Remove obsolete /usr/lib/debug/usr/lib/private dir

Missed in r282420

Reported by: dim

7 years agolibc: remove reference to nonexistent lib/locale directory
Ed Maste [Fri, 20 Jan 2017 02:09:59 +0000 (02:09 +0000)]
libc: remove reference to nonexistent lib/locale directory

As far as I can tell this was introduced in r72406 and updated in several
subsequent revisions, but the lib/locale directory it referenced never
existed.

Reviewed by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9252

7 years agomppc - Finish pluging NETGRAPH_MPPC_COMPRESSION.
Pedro F. Giffuni [Fri, 20 Jan 2017 00:02:11 +0000 (00:02 +0000)]
mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION.

There were several places where reference to compression were left
unfinished. Furthermore, KASSERTs contained references to MPPC_INVALID
which is not defined in the tree and therefore were sure to break with
INVARIANTS: comment them out.

Reported by: Eugene Grosbein
PR: 216265
MFC after: 3 days

7 years agoMerge ACPICA 20170119.
Jung-uk Kim [Thu, 19 Jan 2017 22:07:21 +0000 (22:07 +0000)]
Merge ACPICA 20170119.

7 years agoRework the debug print API. Event printing no longer gets special handling.
Scott Long [Thu, 19 Jan 2017 21:47:50 +0000 (21:47 +0000)]
Rework the debug print API. Event printing no longer gets special handling.
All of the printing from the tables file now has wrappers so that the
handling is cleaner and it's possible to print something out (say, during
development) without having to fight the global debug flags. This re-org
will also make it easier to have the tables be compiled out at build time
if desired.

Other than fixing some minor bugs, there are no user-visible changes from
this change

Sponsored by: Netflix, Inc.
Differential Revision: D9238

7 years ago6569 large file delete can starve out write ops
Josh Paetzel [Thu, 19 Jan 2017 20:44:29 +0000 (20:44 +0000)]
6569 large file delete can starve out write ops

illumos/illumos-gate@ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6
https://github.com/illumos/illumos-gate/commit/ff5177ee8bf9a355131ce2cc61ae2da6a5a6fdd6

https://www.illumos.org/issues/6569
  The core issue I've found is that there is no throttle for how many
  deletes get assigned to one TXG. As a results when deleting large files
  we end up filling consecutive TXGs with deletes/frees, then write
  throttling other (more important) ops.

  There is an easy test case for this problem. Try deleting several
  large files (at least 1/2 TB) while you do write ops on the same
  pool. What we've seen is performance of these write ops (let's
  call it sideload I/O) would drop to zero.

  More specifically the problem is that dmu_free_long_range_impl()
  can/will fill up all of the dirty data in the pool "instantly",
  before many of the sideload ops can get in. So sideload
  performance will be impacted until all the files are freed.

  The solution we have tested at Nexenta (with positive results)
  creates a relatively simple throttle for how many "free" ops we let
  into one TXG.

  However this solution exposes other problems that should also be
  addressed. If we are to slow down freeing of data that means one
  has to wait even longer (assuming vnode ref count of 1) to get shell
  back after an rm or for NFS thread to finish the free-ing op.
  To avoid this the proposed solution is to call zfs_inactive() async
  for "large" files. Async freeing then begs for the reclaimed space
  to be accounted for in the zpool's "freeing" prop.

  The other issue with having a longer delete is the inability to
  export/unmount for a longer period of time. The proposed solution
  is to interrupt freeing of blocks when a fs is unmounted.

Author: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

7 years agoRemove mistakenly merged field.
Konstantin Belousov [Thu, 19 Jan 2017 20:03:26 +0000 (20:03 +0000)]
Remove mistakenly merged field.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdjust gtaskqueue startup again so that we catch the !SMP case and
Sean Bruno [Thu, 19 Jan 2017 19:58:08 +0000 (19:58 +0000)]
Adjust gtaskqueue startup again  so that we catch the !SMP case and
users that choose not to use EARLY_AP_STARTUP.

There is still an initialization issue/panic with !SMP and !EARLY_AP_STARTUP
that we have yet to resolve.

Submitted by: bde

7 years agoAdd mount option for tmpfs(5) to not use namecache.
Konstantin Belousov [Thu, 19 Jan 2017 19:46:49 +0000 (19:46 +0000)]
Add mount option for tmpfs(5) to not use namecache.

The option "nonc" disables using of namecache for the created mount,
by default namecache is used.  The rationale for the option is that
namecache duplicates the information which is already kept in memory
by tmpfs.  Since it believed that namecache scales better than tmpfs,
or will scale better, do not enable the option by default.  On the
other hand, smaller machines may benefit from lesser namecache
pressure.

Discussed with: mjg
Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoImport ACPICA 20170119.
Jung-uk Kim [Thu, 19 Jan 2017 19:46:15 +0000 (19:46 +0000)]
Import ACPICA 20170119.

7 years agoImplement VOP_VPTOCNP() for tmpfs.
Konstantin Belousov [Thu, 19 Jan 2017 19:29:13 +0000 (19:29 +0000)]
Implement VOP_VPTOCNP() for tmpfs.

For directories, node->tn_spec.tn_dir.tn_parent pointer to the parent
is used.  For non-directories, the implementation is naive, all
directory nodes are scanned to find a dirent linking the specified
node.  This can be significantly improved by maintaining tn_parent for
all nodes, later.

Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoVNON nodes cannot exist.
Konstantin Belousov [Thu, 19 Jan 2017 19:25:42 +0000 (19:25 +0000)]
VNON nodes cannot exist.

Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoRefcount tmpfs nodes and mount structures.
Konstantin Belousov [Thu, 19 Jan 2017 19:15:21 +0000 (19:15 +0000)]
Refcount tmpfs nodes and mount structures.

On dotdot lookup and fhtovp operations, it is possible for the file
represented by tmpfs node to be removed after the thread calculated
the pointer.  In this case, tmpfs_alloc_vp() accesses freed memory.

Introduce the reference count on the nodes.  The allnodes list from
tmpfs mount owns 1 reference, and threads performing unlocked
operations on the node, add one transient reference.  Similarly, since
struct tmpfs_mount maintains the list where nodes are enlisted,
refcount it by one reference from struct mount and one reference from
each node on the list.  Both nodes and tmpfs_mounts are removed when
refcount goes to zero.

Note that this means that nodes and tmpfs_mounts might survive some
time after the node is deleted or tmpfs_unmount() finished.  The
tmpfs_alloc_vp() in these cases returns error either due to node
removal (tn_nlinks == 0) or because of insmntque1(9) error.

Tested by: pho (as part of larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoe1000: Add support for Kaby Lake generation i219 (4) and i219 (5) devices
Eric Joyner [Thu, 19 Jan 2017 18:52:38 +0000 (18:52 +0000)]
e1000: Add support for Kaby Lake generation i219 (4) and i219 (5) devices

MFC after: 1 week
Sponsored by: Intel Corporation

7 years agofix a thread preemption regression in schedulers introduced in r270423
Andriy Gapon [Thu, 19 Jan 2017 18:46:41 +0000 (18:46 +0000)]
fix a thread preemption regression in schedulers introduced in r270423

Commit r270423 fixed a regression in sched_yield() that was introduced
in earlier changes.  Unfortunately, at the same time it introduced an
new regression.  The problem is that SWT_RELINQUISH (6), like all other
SWT_* constants and unlike SW_* flags, is not a bit flag.  So, (flags &
SWT_RELINQUISH) is true in cases where that was not really indended,
for example, with SWT_OWEPREEMPT (2) and SWT_REMOTEPREEMPT (11).

A straight forward fix would be to use (flags & SW_TYPE_MASK) ==
SWT_RELINQUISH, but my impression is that the switch types are designed
mostly for gathering statistics, not for influencing scheduling
decisions.

So, I decided that it would be better to check for SW_PREEMPT flag
instead.  That's also the same flag that was checked before r239157.
I double-checked how that flag is used and I am confident that the flag
is set only in the places where we really have the preemption:
- critical_exit + td_owepreempt
- sched_preempt in the ULE scheduler
- sched_preempt in the 4BSD scheduler

Reviewed by: kib, mav
MFC after: 4 days
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D9230

7 years agoMake tmpfs directory cursor available outside tmpfs_subr.c.
Konstantin Belousov [Thu, 19 Jan 2017 18:38:58 +0000 (18:38 +0000)]
Make tmpfs directory cursor available outside tmpfs_subr.c.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoFix problem with suspend and resume when using Skylake chipsets. Make
Hans Petter Selasky [Thu, 19 Jan 2017 18:33:27 +0000 (18:33 +0000)]
Fix problem with suspend and resume when using Skylake chipsets. Make
sure the XHCI controller is reset after halting it. The problem is
clearly a BIOS bug as the suspend and resume is failing without
loading the XHCI driver. The same happens when using Linux and the
XHCI driver is not loaded.

Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com>
PR: 216261
MFC after: 1 week

7 years agoRefresh tmpfs(5) man page.
Konstantin Belousov [Thu, 19 Jan 2017 18:26:06 +0000 (18:26 +0000)]
Refresh tmpfs(5) man page.

Provide more useful explanation of features and quirks.

Reviewed by: emaste, vangyzen
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D9211

7 years agoOnly conditionally add in hyperv support if we're building amd64
Enji Cooper [Thu, 19 Jan 2017 18:07:24 +0000 (18:07 +0000)]
Only conditionally add in hyperv support if we're building amd64

This unbreaks the build because the assembly is written for x64.

MFC after: 3 weeks
X-MFC with: r312418
Pointyhat to: ngie
Reported by: Jenkins (i386 job)
Sponsored by: Dell EMC Isilon

7 years agoAdd manpage for mlx4ib(4)
Enji Cooper [Thu, 19 Jan 2017 17:09:11 +0000 (17:09 +0000)]
Add manpage for mlx4ib(4)

This manpage isn't differentiated from mlx4en except where necessary,
replacing eth/ETH with ib/IB.

Eventually the manpages will be split and the common bits be placed
in a manpage named "mlx4.4".

MFC after: 3 weeks
Reviewed by: hselasky
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9241

7 years agoConditionalize hyperv support in gettimeofday(2) based on MK_HYPERV
Enji Cooper [Thu, 19 Jan 2017 17:03:45 +0000 (17:03 +0000)]
Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV

The effect at runtime is negligible as the hyperv timer isn't available
except when hyperv is loaded.

This is a prerequisite for conditionalizing the header build/install out
of the build

MFC after: 3 weeks
Reviewed by: sephe
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9242

7 years agoFix build of devd with GCC 4.2
Alan Somers [Thu, 19 Jan 2017 16:59:55 +0000 (16:59 +0000)]
Fix build of devd with GCC 4.2

Reported by: olivier
Pointy-hat-to: asomers
MFC after: 27 days
X-MFC-with: 312395
Sponsored by: Spectra Logic Corp

7 years agoffs_vnops: Simplify extattr access
Conrad Meyer [Thu, 19 Jan 2017 16:46:05 +0000 (16:46 +0000)]
ffs_vnops: Simplify extattr access

As suggested in r167010, use the structure type and macros to access and
modify UFS2 extended attributes.  Add assertions that pointers are
aligned in places where we now access the data through a structure
pointer, instead of character-by-character.

PR: 216127
Reported by: dewayne at heuristicsystems.com.au
Reviewed by: kib@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9225