]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoSome further micro-optimizations for the libllvm and lldb build.
dim [Sun, 4 Sep 2016 16:54:55 +0000 (16:54 +0000)]
Some further micro-optimizations for the libllvm and lldb build.

7 years agoUpdate compiler-rt to 3.9.0 release, and update the build glue for
dim [Sat, 3 Sep 2016 21:41:29 +0000 (21:41 +0000)]
Update compiler-rt to 3.9.0 release, and update the build glue for
libcompiler_rt and libclang_rt.

7 years agoMerge ^/head r305346 through r305360.
dim [Sat, 3 Sep 2016 19:09:01 +0000 (19:09 +0000)]
Merge ^/head r305346 through r305360.

7 years agoWith clang 3.9.0, compiling cxgb results in the following warning:
dim [Sat, 3 Sep 2016 19:01:11 +0000 (19:01 +0000)]
With clang 3.9.0, compiling cxgb results in the following warning:

sys/dev/cxgb/cxgb_sge.c:2873:44: error: implicit conversion from 'int'
to 'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion]
                        *mtod(m, char *) = CPL_ASYNC_NOTIF;
                                         ~ ^~~~~~~~~~~~~~~

This is because CPL_ASYNC_NOTIF is 0x80, so the plain char argument is
wrapped to a negative value.  Fix this by using uint8_t instead.

Reviewed by: np
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7772

7 years agoUse correct CTR<n> variant.
np [Sat, 3 Sep 2016 18:54:26 +0000 (18:54 +0000)]
Use correct CTR<n> variant.

7 years agoUpdate contrib/netbsd-tests with new content from NetBSD
ngie [Sat, 3 Sep 2016 18:11:48 +0000 (18:11 +0000)]
Update contrib/netbsd-tests with new content from NetBSD

This updates the snapshot from 09/30/2014 to 08/11/2016

This brings in a number of new testcases from upstream, most
notably:

- bin/cat
- lib/libc
- lib/msun
- lib/libthr
- usr.bin/sort

lib/libc/tests/stdio/open_memstream_test.c was moved to
lib/libc/tests/stdio/open_memstream2_test.c to accomodate
the new open_memstream test from NetBSD.

MFC after: 2 months
Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox
Sponsored by: EMC / Isilon Storage Division

7 years agoSkip testcases 9/10 if jail(8) isn't installed
ngie [Sat, 3 Sep 2016 17:59:46 +0000 (17:59 +0000)]
Skip testcases 9/10 if jail(8) isn't installed

These testcases require jail support

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

7 years agoAdd a missing "Bail out!" if zpool create fails
ngie [Sat, 3 Sep 2016 17:31:13 +0000 (17:31 +0000)]
Add a missing "Bail out!" if zpool create fails

This will make the exit info more meaningful if/when zpool create fails,
and establishes parity with the other 2 zfs acl testcases (01, 03).

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

7 years agoExplicitly include all .rodata.* sections in the kernel .rodata. This
andrew [Sat, 3 Sep 2016 17:23:24 +0000 (17:23 +0000)]
Explicitly include all .rodata.* sections in the kernel .rodata. This
helps link the kernel with lld as it will then put all these into a single
.rodata section.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoUse the root key in the Security ID EFUSE (when valid) to generate a
jmcneill [Sat, 3 Sep 2016 15:28:09 +0000 (15:28 +0000)]
Use the root key in the Security ID EFUSE (when valid) to generate a
MAC address instead of creating a random one each boot.

7 years agoDon't use -N to set the OMAGIC with data and text writeable and data
imp [Sat, 3 Sep 2016 15:26:28 +0000 (15:26 +0000)]
Don't use -N to set the OMAGIC with data and text writeable and data
not page aligned. To do this, use the ld script gnu ld installs on my
system.

This is imperfect: LDFLAGS_BIN and LD_FLAGS_BIN describe different
things. The loader script could be better named and take into account
other architectures. And having two different mechanisms to do
basically the same thing needs study. However, it's blocking forward
progress on lld, so I'll work in parallel to sort these out.

Differential Revision: https://reviews.freebsd.org/D7409
Reviewed by: emaste

7 years agoAdd support for Allwinner A64 thermal sensors.
jmcneill [Sat, 3 Sep 2016 15:26:00 +0000 (15:26 +0000)]
Add support for Allwinner A64 thermal sensors.

7 years agoAdd cpu-supply xref to cpu@0
jmcneill [Sat, 3 Sep 2016 15:24:30 +0000 (15:24 +0000)]
Add cpu-supply xref to cpu@0

7 years agoAdd SID, THS, and CPU operating points.
jmcneill [Sat, 3 Sep 2016 15:23:59 +0000 (15:23 +0000)]
Add SID, THS, and CPU operating points.

7 years agoAdd support for reading root key on A83T/A64.
jmcneill [Sat, 3 Sep 2016 15:22:50 +0000 (15:22 +0000)]
Add support for reading root key on A83T/A64.

7 years agoMerge ^/head r305301 through r305345.
dim [Sat, 3 Sep 2016 13:57:47 +0000 (13:57 +0000)]
Merge ^/head r305301 through r305345.

7 years agoWith clang 3.9.0, compiling ppbus(4) results in the following warnings:
dim [Sat, 3 Sep 2016 13:48:44 +0000 (13:48 +0000)]
With clang 3.9.0, compiling ppbus(4) results in the following warnings:

sys/dev/ppbus/ppb_1284.c:296:46: error: implicit conversion from 'int'
to 'char' changes value from 144 to -112 [-Werror,-Wconstant-conversion]
        if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) {
                     ~~~~~~~~~~~~~~~~~~      ~~~~~~~^~~~~~~
sys/dev/ppbus/ppb_1284.c:785:48: error: implicit conversion from 'int'
to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
                if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY,
                    ~~~~~~~~~~~~      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
sys/dev/ppbus/ppb_1284.c:786:29: error: implicit conversion from 'int'
to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
                                        nACK | SELECT | PERROR | nBUSY)) {
                                        ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

This is because nBUSY is 0x80, so the plain char argument is wrapped to
a negative value.  Fix this in a minimal fashion, by using uint8_t in a
few places.

Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7771

7 years agoDefine drmP.h's __OS_HAS_AGP and __OS_HAS_MTRR macros in a defined and
dim [Sat, 3 Sep 2016 13:33:28 +0000 (13:33 +0000)]
Define drmP.h's __OS_HAS_AGP and __OS_HAS_MTRR macros in a defined and
portable way.

Reviewed by: dumbbell
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7770

7 years agoremove CONSTRUCTORS from MIPS uboot linker script
emaste [Sat, 3 Sep 2016 13:01:37 +0000 (13:01 +0000)]
remove CONSTRUCTORS from MIPS uboot linker script

The linker script CONSTRUCTORS keyword is only meaningful "when linking
object file formats which do not support arbitrary sections, such as
ECOFF and XCOFF"[1] and is ignored for other object file formats.

LLVM's lld does not yet accept (and ignore) CONSTRUCTORS, so just remove
CONSTRUCTORS from the linker script as it has no effect.

[1] https://sourceware.org/binutils/docs/ld/Output-Section-Keywords.html

7 years agoMissed FreeBSD-specific piece of r305338.
mav [Sat, 3 Sep 2016 11:17:33 +0000 (11:17 +0000)]
Missed FreeBSD-specific piece of r305338.

7 years agoMFC r305337: 7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object
mav [Sat, 3 Sep 2016 11:00:29 +0000 (11:00 +0000)]
MFC r305337: 7004 dmu_tx_hold_zap() does dnode_hold() 7x on same object

Using a benchmark which has 32 threads creating 2 million files in the
same directory, on a machine with 16 CPU cores, I observed poor
performance. I noticed that dmu_tx_hold_zap() was using about 30% of
all CPU, and doing dnode_hold() 7 times on the same object (the ZAP
object that is being held).

dmu_tx_hold_zap() keeps a hold on the dnode_t the entire time it is
running, in dmu_tx_hold_t:txh_dnode, so it would be nice to use the
dnode_t that we already have in hand, rather than repeatedly calling
dnode_hold(). To do this, we need to pass the dnode_t down through
all the intermediate calls that dmu_tx_hold_zap() makes, making these
routines take the dnode_t* rather than an objset_t* and a uint64_t
object number. In particular, the following routines will need to have
analogous *_by_dnode() variants created:

dmu_buf_hold_noread()
dmu_buf_hold()
zap_lookup()
zap_lookup_norm()
zap_count_write()
zap_lockdir()
zap_count_write()

This can improve performance on the benchmark described above by 100%,
from 30,000 file creations per second to 60,000. (This improvement is on
top of that provided by working around the object allocation issue. Peak
performance of ~90,000 creations per second was observed with 8 CPUs;
adding CPUs past that decreased performance due to lock contention.) The
CPU used by dmu_tx_hold_zap() was reduced by 88%, from 340 CPU-seconds
to 40 CPU-seconds.

Sponsored by: Intel Corp.

Closes #109

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@d3e523d489a169ab36f9ec1b2a111a60a5563a9f

7 years agoMFV r305336: 7247 zfs receive of deduplicated stream fails
mav [Sat, 3 Sep 2016 10:59:05 +0000 (10:59 +0000)]
MFV r305336: 7247 zfs receive of deduplicated stream fails

This resolves two 'zfs recv' issues. First, when receiving into an
existing filesystem, a snapshot created during the receive process is
not added to the guid->dataset map for the stream, resulting in failed
lookups for deduped streams when a WRITE_BYREF record refers to a
snapshot received earlier in the stream. Second, the newly created
snapshot was also not set properly, referencing the snapshot before the
new receiving dataset rather than the existing filesystem.

Closes #159

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Author: Chris Williamson <chris.williamson@delphix.com>

openzfs/openzfs@b09697c8c18be68abfe538de9809938239402ae8

7 years agoMFV r305335: 7003 zap_lockdir() should tag hold
mav [Sat, 3 Sep 2016 10:58:14 +0000 (10:58 +0000)]
MFV r305335: 7003 zap_lockdir() should tag hold

zap_lockdir() / zap_unlockdir() should take a "void *tag" argument which
tags the hold on the zap. This will help diagnose programming errors
which misuse the hold on the ZAP.

Sponsored by: Intel Corp.

Closes #108

Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@0780b3eab5a2c13e04328b39ecd2a6d0d3c4f7cb

7 years agoMFV r304157:
mav [Sat, 3 Sep 2016 10:10:58 +0000 (10:10 +0000)]
MFV r304157:
7230 add assertions to dmu_send_impl() to verify that stream includes BEGIN and END records

illumos/illumos-gate@12b90ee2d3b10689fc45f4930d2392f5fe1d9cfa
https://github.com/illumos/illumos-gate/commit/12b90ee2d3b10689fc45f4930d2392f5f
e1d9cfa

https://www.illumos.org/issues/7230
  A test failure occurred where a send stream had only a BEGIN record. This
  should not be possible if the send returns without error. Prevented this from
  happening in the future by adding an assertion to dmu_send_impl() to verify
  that if the function returns 0 (success) both a BEGIN and END record are
  present. Did this by adding flags to dmu_sendarg_t (indicating whether BEGIN o
r
  END records sent), having dump_record() set flags appropriately, adding VERIFY
  statement to dmu_send_impl().

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matt Krantz <matt.krantz@delphix.com>

7 years agoMFV r304156: 7235 remove unused func dsl_dataset_set_blkptr
mav [Sat, 3 Sep 2016 10:09:23 +0000 (10:09 +0000)]
MFV r304156: 7235 remove unused func dsl_dataset_set_blkptr

illumos/illumos-gate@bd56f80007857b960e0981ed0797ad8ec844a96b
https://github.com/illumos/illumos-gate/commit/bd56f80007857b960e0981ed0797ad8ec
844a96b

https://www.illumos.org/issues/7235
  The function dsl_dataset_set_blkptr() is unused. We should remove it.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r304159: 7277 zdb should be able to print zfs_dbgmsg's
mav [Sat, 3 Sep 2016 10:07:46 +0000 (10:07 +0000)]
MFV r304159: 7277 zdb should be able to print zfs_dbgmsg's

illumos/illumos-gate@29bdd2f916366ece37c4748bca6b3d61f57a223b
https://github.com/illumos/illumos-gate/commit/29bdd2f916366ece37c4748bca6b3d61f
57a223b

https://www.illumos.org/issues/7277
  ztest always prints the debug messages (zfs_dbgmsg()) by calling
  zfs_dbgmsg_print(). We should add a flag to zdb to make it do this as well
  before exiting.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Pavel Zakharov <pavel.zakharov@delphix.com>

7 years agoMFV r304155: 7090 zfs should improve allocation order and throttle allocations
mav [Sat, 3 Sep 2016 10:04:37 +0000 (10:04 +0000)]
MFV r304155: 7090 zfs should improve allocation order and throttle allocations

illumos/illumos-gate@0f7643c7376dd69a08acbfc9d1d7d548b10c846a
https://github.com/illumos/illumos-gate/commit/0f7643c7376dd69a08acbfc9d1d7d548b
10c846a

https://www.illumos.org/issues/7090
  When write I/Os are issued, they are issued in block order but the ZIO pipelin
e
  will drive them asynchronously through the allocation stage which can result i
n
  blocks being allocated out-of-order. It would be nice to preserve as much of
  the logical order as possible.
  In addition, the allocations are equally scattered across all top-level VDEVs
  but not all top-level VDEVs are created equally. The pipeline should be able t
o
  detect devices that are more capable of handling allocations and should
  allocate more blocks to those devices. This allows for dynamic allocation
  distribution when devices are imbalanced as fuller devices will tend to be
  slower than empty devices.
  The change includes a new pool-wide allocation queue which would throttle and
  order allocations in the ZIO pipeline. The queue would be ordered by issued
  time and offset and would provide an initial amount of allocation of work to
  each top-level vdev. The allocation logic utilizes a reservation system to
  reserve allocations that will be performed by the allocator. Once an allocatio
n
  is successfully completed it's scheduled on a given top-level vdev. Each top-
  level vdev maintains a maximum number of allocations that it can handle
  (mg_alloc_queue_depth). The pool-wide reserved allocations (top-levels *
  mg_alloc_queue_depth) are distributed across the top-level vdevs metaslab
  groups and round robin across all eligible metaslab groups to distribute the
  work. As top-levels complete their work, they receive additional work from the
  pool-wide allocation queue until the allocation queue is emptied.

Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFV r303081: 7163 ztest failures due to excess error injection
mav [Sat, 3 Sep 2016 08:48:51 +0000 (08:48 +0000)]
MFV r303081: 7163 ztest failures due to excess error injection

illumos/illumos-gate@f34284d835bc555f987c1310df46c034c3101155
https://github.com/illumos/illumos-gate/commit/f34284d835bc555f987c1310df46c034c
3101155

https://www.illumos.org/issues/7163
  Running zloop from zfs-precommit hit this assertion:
       *panicstr/s
  0xfffffd7fd7419370: assertion failed for thread 0xfffffd7fe29ed240,
  thread-id 577: parent != NULL, file ../../../uts/common/fs/zfs/dbuf.c, line
  1827
       $c
  libc.so.1`_lwp_kill+0xa()
  libc.so.1`_assfail+0x182(fffffd7ffb1c29fafffffd7ffb1cc028, 723)
  libc.so.1`assfail+0x19(fffffd7ffb1c29fafffffd7ffb1cc028, 723)
  libzpool.so.1`dbuf_dirty+0xc69(10e3bc103601700)
  libzpool.so.1`dbuf_dirty+0x61e(10c736403601700)
  libzpool.so.1`dbuf_dirty+0x61e(10e282803601700)
  libzpool.so.1`dmu_buf_will_fill+0x64(10e282803601700)
  libzpool.so.1`dmu_write+0x1b6(2c7e640, d, 400000002e000000, 200, 3717b40,
  3601700)
  ztest_replay_write+0x568(4950d0, 3717a80, 0)
  ztest_write+0x125(4950d0, d, 400000002e000000, 200, 413f000)
  ztest_io+0x1bb(4950d0, d, 400000002e000000)
  ztest_dmu_write_parallel+0xaa(4950d0, 6)
  ztest_execute+0x83(1, 420c98, 6)
  ztest_thread+0xf4(6)
  libc.so.1`_thrp_setup+0x8a(fffffd7fe29ed240)
  libc.so.1`_lwp_start()
  This is another manifestation of ECKSUM in ztest:
  The lowest level ancestor that’s in memory is the L8 (topmost). The L7
  ancestor is blkid 0x10:
       ::dbufs -O 0x2c7e640 -o d -l 7 |::dbuf
  addr object lvl blkid holds os
  600be50 d 7 4 1 ztest/ds_6
  719d880 d 7 0 4 ztest/ds_6

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r303080: 6451 ztest fails due to checksum errors
mav [Sat, 3 Sep 2016 08:47:46 +0000 (08:47 +0000)]
MFV r303080: 6451 ztest fails due to checksum errors

illumos/illumos-gate@f9eb9fdf196b6ed476e4ffc69cecd8b0da3cb7e7
https://github.com/illumos/illumos-gate/commit/f9eb9fdf196b6ed476e4ffc69cecd8b0d
a3cb7e7

https://www.illumos.org/issues/6451
  Sometimes ztest fails because zdb detects checksum errors. e.g.:
  Traversing all blocks to verify checksums and verify nothing leaked ...
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 8000160> DVA0=<0:1cc2000:
  180000> [L0 other uint64[]] sha256 uncompressed LE contiguou
  s unique single size=100000L/100000P birth=271L/271P fill=1
  cksum=c5a3e27d1ed0f894:843bca3a5473c4bf:f76a19b6830a2e4:91292591613a12bf --
  skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 800000180> DVA0=<0:ce16800:
  180000> [L0 other uint64[]] sha256 uncompressed LE contigu
  ous unique single size=100000L/100000P birth=840L/840P fill=1
  cksum=5d018f3d061e17f3:6d1584784587bf63:2805a74a0ce37369:ba68a214806c7e75
  -- skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 1000000360> DVA0=<0:10d37400:
  180000> [L0 other uint64[]] sha256 uncompressed LE conti
  guous unique single size=100000L/100000P birth=904L/904P fill=1
  cksum=fa1e11d4138bd14b:86c9488c444473e3:f31e43c72e72e46b:e3446472d1174d
  ba -- skipping
  zdb_blkptr_cb: Got error 50 reading <71, 47, 0, 400000002c0> DVA0=<0:127ef400:
  180000> [L0 other uint64[]] sha256 uncompressed LE cont
  iguous dedup single size=100000L/100000P birth=549L/549P fill=1
  cksum=30e14955ebf13522:66dc2ff8067e6810:4607e750abb9d3b3:6582b8af909fcb
  58 -- skipping
  zdb_blkptr_cb: Got error 50 reading <657, 5, 0, 1c0> DVA0=<0:1a180400:180000>
  [L0 other uint64[]] fletcher4 uncompressed LE contiguou
  s unique single size=100000L/100000P birth=1091L/1091P fill=1 cksum=a6cf1e50:
  29b3bd01c57e5:36779b914035db9a:db61cdcf6bec56f0 -- skippin
  g
  The problem is that ztest_fault_inject() can inject multiple faults into the
  same block. It is designed such that it can inject errors on all leafs of a
  RAID-Z or mirror, but for a given range of offsets, it will only inject errors

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r303079:
mav [Sat, 3 Sep 2016 08:46:53 +0000 (08:46 +0000)]
MFV r303079:
7147 ztest: ztest_ddt_repair fails with ztest_pattern_match assertion

illumos/illumos-gate@aab80726335c76a7cae32c7300890248d73a51e3
https://github.com/illumos/illumos-gate/commit/aab80726335c76a7cae32c7300890248d
73a51e3

https://www.illumos.org/issues/7147
  Here's the dbuf we're currently reading:
       966f200::dbuf
  addr object lvl blkid holds os
  966f200 4 0 0 1 ztest/ds_3
       966f200::print dmu_buf_t db_data
  db_data = 0x9ae0400
       0x9ae0400/10J
  0x9ae0400: c1c7ced932020d c1c7ced932020d c1c7ced932020d c1c7ced932020d
  c1c7ced932020d c1c7ced932020d c1c7ced932020d c1c7ced932020d
  c1c7ced932020d c1c7ced932020d
  The pattern we're expecting is actually this: a34ae10b5f2db2. If we attempt to
  read the block on disk we find that it has matches what ztest_ddt_repair()
  would have written:
       ~c1c7ced932020d=J
  ff3e383126cdfdf2
       966f200::print dmu_buf_impl_t db_blkptr | ::blkptr
  DVA0=<0:71d3c00:800>
  [L0 UINT64_OTHER] SHA256 OFF LE contiguous dedup single
  size=400L/400P birth=55L/55P fill=1
  cksum=18486450d3ce8c6d:75a72f4bbf117b0f:2d3a226314eb5650:2eb0fd68648b1af0
     1. zdb -U /rpool/tmp/zpool.cache -R ztest 0:71d3c00:800 | head
        Found vdev type: mirror
  0:71d3c00:800
  0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
  000000: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000010: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000020: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000030: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000040: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.
  000050: ff3e383126cdfdf2 ff3e383126cdfdf2 ...&18>....&18>.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFV r303078:
mav [Sat, 3 Sep 2016 08:43:43 +0000 (08:43 +0000)]
MFV r303078:
7086 ztest attempts dva_get_dsize_sync on an embedded blockpointer

illumos/illumos-gate@926549256b71acd595f69b236779ff6b78fa08ef
https://github.com/illumos/illumos-gate/commit/926549256b71acd595f69b236779ff6b7
8fa08ef

https://www.illumos.org/issues/7086
  In dbuf_dirty(), we need to grab the dn_struct_rwlock before looking at the
  db_blkptr, to prevent it from being changed by syncing context.
  Otherwise we may see that ztest got a segfault from this stack:
  libzpool.so.1`dva_get_dsize_sync+0x98(872f000b32b240fed7811b, 0, b4cda20,
0)
  libzpool.so.1`bp_get_dsize+0x60(872f000b32b240, 0, 97cb7809d4c1a8, 0)
  libzpool.so.1`dbuf_dirty+0x9b3(ce0a10097cb780, 9, fecd2530)
  libzpool.so.1`dmu_buf_will_dirty+0xc3(ce0a10097cb780ea293d6c, 1)
  libzpool.so.1`zap_lockdir+0x1a0(8aaa3c0, 1, 0, 97cb780, 1, 1)
  libzpool.so.1`zap_remove_norm+0x30(8aaa3c0, 1, 0, 8728b10, 0, 97cb780)
  libzpool.so.1`zap_remove+0x29(8aaa3c0, 1, 0, 8728b1097cb780, a)
  ztest_replay_remove+0x225(ea2945888728ae8, 0, 38010000, 0, 0)
  ztest_remove+0x9f(ea294588ea293f50, 4, 3)
  ztest_object_init+0x78(ea294588ea293f50, 4e0, 1)
  ztest_dmu_object_alloc_free+0x71(ea294588, 13)
  ztest_dmu_objset_create_destroy+0x224(80cef08, 13, 0, 805d36c9017ad44, 0)
  ztest_execute+0x89(a, 807c720, 13, 0)
  ztest_thread+0xea(13, 0, 0, 0)
  libc.so.1`_thrp_setup+0x88(f0983240)
  libc.so.1`_lwp_start(f0983240, 0, 0, 0, 0, 0)
  Looking into it a bit, we see that this is an embedded blockpointer, so
  BP_GET_NDVAS should have returned 0:
       b32b240::blkptr
  EMBEDDED [L0 ZAP_OTHER] et=0 LZ4 size=200L/4aP birth=80L
  Instead, it looks like another thread is modifying this blockpointer:
       b32b240::ugrep | ::whatis
  f47a0e0c is in [ stack tid=0x19f ]
  ebd6ec40 is in [ stack tid=0x226 ]
  ea293bd0 is in [ stack tid=0x244 ]
  ea293be4 is in [ stack tid=0x244 ]

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r303077:
mav [Sat, 3 Sep 2016 08:42:12 +0000 (08:42 +0000)]
MFV r303077:
7072 zfs fails to expand if lun added when os is in shutdown state

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

https://www.illumos.org/issues/7072
  upstream:
  38733 zfs fails to expand if lun added when os is in shutdown state
  DLPX-36910 spares and caches should not display expandable space
  DLPX-39262 vdev_disk_open spam zfs_dbgmsg buffer

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: George Wilson <george.wilson@delphix.com>

7 years agoMFV r302991: 6950 ARC should cache compressed data
mav [Sat, 3 Sep 2016 08:30:51 +0000 (08:30 +0000)]
MFV r302991: 6950 ARC should cache compressed data

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

https://www.illumos.org/issues/6950
  When reading compressed data from disk, the ARC should keep the compressed
  block cached and only decompress it when consumers access the block. The
  uncompressed data should be short-lived allowing the ARC to cache a much larger
  amount of data. The DMU would also maintain a smaller cache of uncompressed
  blocks to minimize the impact of decompressing frequently accessed blocks.

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: George Wilson <george.wilson@delphix.com>

7 years agoReturn a NULL pointer (0 vm_offset) on error in map_dcsr().
jhibbits [Sat, 3 Sep 2016 04:21:40 +0000 (04:21 +0000)]
Return a NULL pointer (0 vm_offset) on error in map_dcsr().

mpc85xx_map_dcsr() returns a vm_offset_t, not an error code.  Follow-up to
r304069.

7 years agoUse the right ifdef macro.
jhibbits [Sat, 3 Sep 2016 04:09:03 +0000 (04:09 +0000)]
Use the right ifdef macro.

"E500" is not defined, but "BOOKE_E500" is.  Without this the idle hook cannot
be called.

MFC after: 1 week

7 years agoAs an optimization to the machine-independent layer, change the machine-
alc [Sat, 3 Sep 2016 03:14:24 +0000 (03:14 +0000)]
As an optimization to the machine-independent layer, change the machine-
dependent pmap_ts_referenced() so that it updates the page's dirty field
if a modified bit is found while counting reference bits.  This
opportunistic update can be performed at low cost and can eliminate the
need for some future calls to pmap_is_modified() by the machine-
independent layer.

MFC after: 3 weeks

7 years agoHandle missed mergeinfo by merging r305031 (the missing revision
ngie [Sat, 3 Sep 2016 02:51:46 +0000 (02:51 +0000)]
Handle missed mergeinfo by merging r305031 (the missing revision
according to svn merge)

7 years agoMFhead @ r305314
ngie [Sat, 3 Sep 2016 00:50:18 +0000 (00:50 +0000)]
MFhead @ r305314

7 years agoDon't dedupe signals less than SIGRTMIN
ngie [Sat, 3 Sep 2016 00:47:54 +0000 (00:47 +0000)]
Don't dedupe signals less than SIGRTMIN

FreeBSD always delivers all signals sent with sigqueue, except when
dealing with low memory conditions according to kib (see
bug # 212173 comment # 5).

In collaboration with: kib
PR: 212173
Sponsored by: EMC / Isilon Storage Division

7 years agoAdd cpuset support to separate forked processes.
gnn [Sat, 3 Sep 2016 00:22:42 +0000 (00:22 +0000)]
Add cpuset support to separate forked processes.

Reviewed by: cem
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D7766

7 years agoUpdate ObsoleteFiles.inc and OptionalObsoleteFiles.inc.
dim [Fri, 2 Sep 2016 22:21:28 +0000 (22:21 +0000)]
Update ObsoleteFiles.inc and OptionalObsoleteFiles.inc.

7 years agoAdd a runner script for cryptotest.
gnn [Fri, 2 Sep 2016 21:35:32 +0000 (21:35 +0000)]
Add a runner script for cryptotest.

Althought cryptotest itself has a -z mode to test all algorithms at a variety
of sizes, this script allows us to be more selective.  Threads and buffer sizes
move in powers of two from 1, for threads, and 256 for buffer sizes.

e.g.  cryptorun.sh aes 4 512

Test aes with 1, 2 and 4 processes, and at sizes of 256 and 512 bytes.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agodhclient: add support for interface-mtu (26)
cem [Fri, 2 Sep 2016 21:14:29 +0000 (21:14 +0000)]
dhclient: add support for interface-mtu (26)

Make dhclient set interface MTU if it was provided.

This version implements MTU setting in dhclient itself before it runs
dhclient-script.

PR: 206721
Submitted by: novel@
Reported by: Jarrod Petz <jlpetz at gmail.com>
Reviewed by: cem, allanjude
Differential Revision: https://reviews.freebsd.org/D5675

7 years agosh: Add some tests for non-standard features of the echo builtin.
jilles [Fri, 2 Sep 2016 21:13:46 +0000 (21:13 +0000)]
sh: Add some tests for non-standard features of the echo builtin.

MFC after: 1 week

7 years agoClean up the usage message and remove dead code.
gnn [Fri, 2 Sep 2016 21:11:37 +0000 (21:11 +0000)]
Clean up the usage message and remove dead code.

Reviewed by: cem
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D7765

7 years agoDIRDEPS_BUILD: Update dependencies after a 'make bootstrap-tools'.
bdrewery [Fri, 2 Sep 2016 20:41:43 +0000 (20:41 +0000)]
DIRDEPS_BUILD: Update dependencies after a 'make bootstrap-tools'.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

7 years agoUndo r305299, since it also sets up BINDIR, via usr.bin/Makefile.inc.
dim [Fri, 2 Sep 2016 20:07:05 +0000 (20:07 +0000)]
Undo r305299, since it also sets up BINDIR, via usr.bin/Makefile.inc.
Just set WARNS to zero instead.

7 years agoMerge ^/head r305220 through r305300.
dim [Fri, 2 Sep 2016 19:44:23 +0000 (19:44 +0000)]
Merge ^/head r305220 through r305300.

7 years agoDIRDEPS_BUILD: Clang headers are now in lib/clang/headers
bdrewery [Fri, 2 Sep 2016 19:28:24 +0000 (19:28 +0000)]
DIRDEPS_BUILD: Clang headers are now in lib/clang/headers

Sponsored by: EMC / Isilon Storage Division

7 years agoFor now, undo the WARNS=3 setting for the clang and llvm tools. More
dim [Fri, 2 Sep 2016 19:26:39 +0000 (19:26 +0000)]
For now, undo the WARNS=3 setting for the clang and llvm tools.  More
work needs to be done first to get everything compiling without warnings.

7 years agoUpdate clang to the final 3.9.0 release. There were no more code changes
dim [Fri, 2 Sep 2016 19:20:27 +0000 (19:20 +0000)]
Update clang to the final 3.9.0 release. There were no more code changes
since the last release candidate.

7 years agoRenaming libifc to libifconfig in response to feedback on initial commit of
kp [Fri, 2 Sep 2016 18:33:08 +0000 (18:33 +0000)]
Renaming libifc to libifconfig in response to feedback on initial commit of
this library. Sticking to 'libifconfig' (and 'ifconfig_' as function prefix)
should reduce chances of namespace collisions, make it more clear what the
library does, and be more in line with existing libraries.

Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Differential Revision: https://reviews.freebsd.org/D7742
Reviewed by: cem, kp

7 years agoWhen -n is specified, don't make bogus DNS queries. Instead,
ume [Fri, 2 Sep 2016 18:28:14 +0000 (18:28 +0000)]
When -n is specified, don't make bogus DNS queries.  Instead,
when -n is specified more than once, hostnames stored in utmp
are attempted to resolve to display them as network addresses.

PR: 212272

7 years agoMerge from CheriBSD:
brooks [Fri, 2 Sep 2016 18:22:56 +0000 (18:22 +0000)]
Merge from CheriBSD:

Rename sigprop-table constants to SIGPROP_ from SA_ to reduce the
impression of a namespace collision.

Submitted by: rwatson
Reviewed by: jhb, kib (slightly different versions)
Obtained from: CheriBSD (814ec5771cb1cb53deba317c561de62a91ae7684)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D7616

7 years agoAdd a pc_clock pcpu field and use it to implement cpu_est_clockrate. This
andrew [Fri, 2 Sep 2016 10:13:51 +0000 (10:13 +0000)]
Add a pc_clock pcpu field and use it to implement cpu_est_clockrate. This
will allow drivers that manage the clock frequency to communicate this with
the reset of the kernel.

Reported by: jmcneill
MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoFix array size issue when using the pre-scaling feature for
hselasky [Fri, 2 Sep 2016 08:44:14 +0000 (08:44 +0000)]
Fix array size issue when using the pre-scaling feature for
ISOCHRONOUS USB transfers. Make sure enough length and buffer pointers
are allocated when setting up the libusb transfer structure to support
the maximum number of frames the kernel can handle.

MFC after: 1 week

7 years agoSkip :test_large on i386
ngie [Fri, 2 Sep 2016 08:17:43 +0000 (08:17 +0000)]
Skip :test_large on i386

More assertions are failing on ^/head now.

PR: 205446
Sponsored by: EMC / Isilon Storage Division

7 years agoDon't expect :fmod to fail on FreeBSD
ngie [Fri, 2 Sep 2016 06:55:32 +0000 (06:55 +0000)]
Don't expect :fmod to fail on FreeBSD

Sponsored by: EMC / Isilon Storage Division

7 years agohyperv/ic: Cleanup timesync channel callback.
sephe [Fri, 2 Sep 2016 06:23:28 +0000 (06:23 +0000)]
hyperv/ic: Cleanup timesync channel callback.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7745

7 years agohyperv/ic: Cleanup shutdown channel callback.
sephe [Fri, 2 Sep 2016 06:15:30 +0000 (06:15 +0000)]
hyperv/ic: Cleanup shutdown channel callback.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7744

7 years agohyperv/ic: Minor style fix.
sephe [Fri, 2 Sep 2016 06:08:08 +0000 (06:08 +0000)]
hyperv/ic: Minor style fix.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7743

7 years agonet/rndis: Define common message header for RNDIS messages.
sephe [Fri, 2 Sep 2016 05:57:13 +0000 (05:57 +0000)]
net/rndis: Define common message header for RNDIS messages.

And avoid RNDIS_HEADER_OFFSET hardcoding.

Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7739

7 years agonet/rndis: Add comment for rndis_comp_hdr
sephe [Fri, 2 Sep 2016 05:49:38 +0000 (05:49 +0000)]
net/rndis: Add comment for rndis_comp_hdr

Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7738

7 years agohyperv/hn: Use the per-packet-info types defined by net/rndis.h
sephe [Fri, 2 Sep 2016 05:30:38 +0000 (05:30 +0000)]
hyperv/hn: Use the per-packet-info types defined by net/rndis.h

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7737

7 years agohyperv/hn: Simplify RX hash related bits.
sephe [Fri, 2 Sep 2016 03:19:55 +0000 (03:19 +0000)]
hyperv/hn: Simplify RX hash related bits.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7736

7 years agocron: use existing maximum username constant MAXLOGNAME
emaste [Fri, 2 Sep 2016 03:15:54 +0000 (03:15 +0000)]
cron: use existing maximum username constant MAXLOGNAME

Previously cron had its own maximum username length limit, which was
smaller than the system's MAXLOGNAME. This could lead to crontab -u
updating the wrong user's crontab (if the name was truncated, and
matched another user).

PR: 212305
Reported by: Andrii Kuzik
Reviewed by: allanjude, jilles
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7747

7 years agohyperv/hn: Rework RXCSUM related bits
sephe [Fri, 2 Sep 2016 03:10:30 +0000 (03:10 +0000)]
hyperv/hn: Rework RXCSUM related bits

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7735

7 years agoRevert r304192 to fix short month names and replace %b with %_m in date_fmt
kevlo [Fri, 2 Sep 2016 00:43:03 +0000 (00:43 +0000)]
Revert r304192 to fix short month names and replace %b with %_m in date_fmt
for Chinese locales.

As mentioned in the commit message of r289041, nl_langinfo(ABMON_*) only
returned numbers when using a Chinese locale, this causes problems in
applications that put the short month name and the day of the month together.

Spotted by: Ting-Wei Lan <lantw44 gmail com>

7 years agoReplace %m with %_m in date_fmt for Chinese locales.
kevlo [Fri, 2 Sep 2016 00:27:27 +0000 (00:27 +0000)]
Replace %m with %_m in date_fmt for Chinese locales.
This is a fix for the problem mentioned in the PR.

PR: 199441

7 years agocxgbe/cxgbei: Provide a knob to set the DDP threshold for iSCSI
np [Fri, 2 Sep 2016 00:21:24 +0000 (00:21 +0000)]
cxgbe/cxgbei: Provide a knob to set the DDP threshold for iSCSI
transfers.

The Initiator and Target both perform zero copy receive for transfers
greater than or equal to this threshold.

Sponsored by: Chelsio Communications

7 years agoInitialize lists of signals using C99 designators
brooks [Fri, 2 Sep 2016 00:16:19 +0000 (00:16 +0000)]
Initialize lists of signals using C99 designators

Reviewed by: jilles
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D7601

7 years agocxgbe/cxgbei: Count various events related to iSCSI operation and make
np [Thu, 1 Sep 2016 23:58:36 +0000 (23:58 +0000)]
cxgbe/cxgbei: Count various events related to iSCSI operation and make
these counters available in the sysctl MIB.

Sponsored by: Chelsio Communications

7 years agoioat(4): Despam relatively common hardware reset messages
cem [Thu, 1 Sep 2016 23:56:02 +0000 (23:56 +0000)]
ioat(4): Despam relatively common hardware reset messages

Reported by: ngie@

7 years agoDIRDEPS_BUILD: Build crunchide for the host.
bdrewery [Thu, 1 Sep 2016 23:52:25 +0000 (23:52 +0000)]
DIRDEPS_BUILD: Build crunchide for the host.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

7 years agoDIRDEPS_BUILD: Include crunched object meta files for gendirdeps.
bdrewery [Thu, 1 Sep 2016 23:52:20 +0000 (23:52 +0000)]
DIRDEPS_BUILD: Include crunched object meta files for gendirdeps.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

7 years agoBump __FreeBSD_version for crunchgen META_MODE fix in r305254.
bdrewery [Thu, 1 Sep 2016 23:22:31 +0000 (23:22 +0000)]
Bump __FreeBSD_version for crunchgen META_MODE fix in r305254.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

7 years agoDIRDEPS_BUILD: Fix 'make bootstrap-tools' not using the proper tblgen binaries.
bdrewery [Thu, 1 Sep 2016 23:21:12 +0000 (23:21 +0000)]
DIRDEPS_BUILD: Fix 'make bootstrap-tools' not using the proper tblgen binaries.

This was an incomplete item from r291561.  The host {clang,llvm}-tblgen
binaries were used, rather than the ones built into the host stagedir by
normal Makefile.depend dependencies on tblgen.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

7 years agoMETA_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds.
bdrewery [Thu, 1 Sep 2016 23:21:08 +0000 (23:21 +0000)]
META_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds.

- DIRDEPS_BUILD: Fix crunchgen builds losing their library dependencies
  on a nop-rebuild.
- META_MODE: Fix not rebuilding various crunch.mk targets if their .meta
  files warrant a rebuild.  They were lacking .meta files previously.
  This adds .NOMETA to the crunch objects being used since they are
  already built.  Bmake was forcing a rebuild on them since their
  .meta files were not in the expected place; there is no reason to
  rebuild them.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

7 years agoMETA_MODE: Don't expect .meta files for side-effect generated files.
bdrewery [Thu, 1 Sep 2016 23:20:54 +0000 (23:20 +0000)]
META_MODE: Don't expect .meta files for side-effect generated files.

This is similar to r301285.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

7 years agoDIRDEPS_BUILD: Don't conditionally include src.opts.mk.
bdrewery [Thu, 1 Sep 2016 22:58:53 +0000 (22:58 +0000)]
DIRDEPS_BUILD: Don't conditionally include src.opts.mk.

This was preventing having MK_LLD a value set in 'make bootstrap-tools' since
MK_LLDB was forced to no in that context.

Sponsored by: EMC / Isilon Storage Division

7 years agocxgbe/cxgbei: Minor changes in the iSCSI CPL handlers.
np [Thu, 1 Sep 2016 22:40:55 +0000 (22:40 +0000)]
cxgbe/cxgbei: Minor changes in the iSCSI CPL handlers.

- Use m_copydata instead of bcopy.
- Add new assertions.
- Log some more information.

Sponsored by: Chelsio Communications

7 years agoRemove warning about pci_addr_t being different sizes.
jhb [Thu, 1 Sep 2016 21:30:12 +0000 (21:30 +0000)]
Remove warning about pci_addr_t being different sizes.

pci_addr_t has always been 64-bits since r163805.

MFC after: 1 week

7 years agoAdd support for changing A23 PLL1 frequency.
jmcneill [Thu, 1 Sep 2016 21:20:07 +0000 (21:20 +0000)]
Add support for changing A23 PLL1 frequency.

7 years agoAdd support for setting DCDC2 voltage.
jmcneill [Thu, 1 Sep 2016 21:19:11 +0000 (21:19 +0000)]
Add support for setting DCDC2 voltage.

7 years agoRemove the digi(4) manpage and digi from the release notes.
jhb [Thu, 1 Sep 2016 21:16:29 +0000 (21:16 +0000)]
Remove the digi(4) manpage and digi from the release notes.

7 years agoDIRDEPS_BUILD: Add missing crunchgen host tool.
bdrewery [Thu, 1 Sep 2016 21:15:37 +0000 (21:15 +0000)]
DIRDEPS_BUILD: Add missing crunchgen host tool.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

7 years agoDIRDEPS_BUILD: Connect lld.
bdrewery [Thu, 1 Sep 2016 21:03:27 +0000 (21:03 +0000)]
DIRDEPS_BUILD: Connect lld.

Sponsored by: EMC / Isilon Storage Division

7 years agoUse a proper comment.
bdrewery [Thu, 1 Sep 2016 21:02:02 +0000 (21:02 +0000)]
Use a proper comment.

Submitted by: emaste

7 years agofgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete
ache [Thu, 1 Sep 2016 20:45:04 +0000 (20:45 +0000)]
fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete
sequence near EOF), so we can't just check for
(wc == WEOF && !__sfeof(fp)) and must relay on __sferror(fp) with
__SERR clearing/restoring.

MFC after:      7 days

7 years agocxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to
np [Thu, 1 Sep 2016 20:43:01 +0000 (20:43 +0000)]
cxgbe/cxgbei: Retire all DDP related code from cxgbei and switch to
routines available in t4_tom to manage the iSCSI DDP page pod region.

This adds the ability to use multiple DDP page sizes to the iSCSI
driver, among other improvements.

Sponsored by: Chelsio Communications

7 years agoDIRDEPS_BUILD: Connect the new clang build.
bdrewery [Thu, 1 Sep 2016 20:38:59 +0000 (20:38 +0000)]
DIRDEPS_BUILD: Connect the new clang build.

Sponsored by: EMC / Isilon Storage Division

7 years agoBuild lld by default on amd64 and arm64
emaste [Thu, 1 Sep 2016 20:36:10 +0000 (20:36 +0000)]
Build lld by default on amd64 and arm64

7 years agoDIRDEPS_BUILD: Clang libraries now have nested directories/objects in OBJDIR.
bdrewery [Thu, 1 Sep 2016 20:23:49 +0000 (20:23 +0000)]
DIRDEPS_BUILD: Clang libraries now have nested directories/objects in OBJDIR.

These nested directories are not build targets.  They just map back to
lib/clang/lib{clang,llvm,llvmminimal,lldb}.  Avoid adding these nested
directories into Makefile.depend.

Sponsored by: EMC / Isilon Storage Division

7 years agoRemove the digi(4) drivers.
jhb [Thu, 1 Sep 2016 19:51:35 +0000 (19:51 +0000)]
Remove the digi(4) drivers.

These drivers were never updated for the new TTY changes and have
been disconnected from the build since 8.0.

Ok'd by: imp, peterj

7 years agoThe log message for the previous commit didn't mention the most the
bde [Thu, 1 Sep 2016 19:18:26 +0000 (19:18 +0000)]
The log message for the previous commit didn't mention the most the
important detail that sc_cngetc() now opens and closes the keyboard
on every call again.  This was moved from sc_cngetc() to scn_cngrab/
ungrab() in r228644, but the change wasn't quite complete.  After
fixes for nesting in kbdd_poll() in ukbd and kbdmux, these opens
and closes should have no significant effect if done while grabbed.
They fix unusual cases when cngetc() is called while not grabbed.

This commit is the main fix for screen locking in sc_cnputc():
detect deadlock or likely-deadlock and handle it by buffering the
output atomically and printing it later if the deadlock condition
clears (and sc_cnputc() is called).

The most common deadlock is when the screen lock is held by ourself.
Then it would be safe to acquire the lock recursively if the console
driver is calling printf() in a safe context, but we don't know when
that is.  It is not safe to ignore the lock even in kdb or panic mode.
But ignore it in panic mode.  The only other known case of deadlock
is when another thread holds the lock but is running on a stopped CPU.
Detect that case approximately by using trylock and retrying for 1000
usec.  On a 4 GHz CPU, 100 usec is almost long enough -- screen switches
take slightly longer than that.  Not retrying at all is good enough
except for stress tests, and planned future versions will extend the
timeout so that the stress tests work better.

To see the behaviour when deadlock is detected, single step through
sctty_outwakeup() (or sc_puts() to start with deadlock).  Another
(serial) console is needed to the buffered-only output, but the
keyboard works in this context to continue or step out of the
deadlocked region.  The buffer is not large enough to hold all the
output for this.

7 years agoMFV r304158:
mav [Thu, 1 Sep 2016 18:37:11 +0000 (18:37 +0000)]
MFV r304158:
7136 ESC_VDEV_REMOVE_AUX ought to always include vdev information

7115 6922 generates ESC_ZFS_VDEV_REMOVE_AUX a bit too often

illumos/illumos-gate@b72b6bb10ad55121a1b352c6f68ebdc8e20c9086
https://github.com/illumos/illumos-gate/commit/b72b6bb10ad55121a1b352c6f68ebdc8e
20c9086

https://www.illumos.org/issues/7136
  6922 added ESC_ZFS_VDEV_REMOVE_AUX and ESC_ZFS_VDEV_REMOVE_DEV sysevents
  whenever an aux device gets removed from a pool. However, those sysevents will
  be created without the vdev_guid and vdev_path fields. It would be better to
  always populate those fields.

https://www.illumos.org/issues/7115
  The addition of spa_event_notify in vdev removal code (see #6922) causes event
s
  to be generated even if the spare failed to be removed with EBUSY.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Alan Somers <asomers@gmail.com>

7 years agoDIRDEPS_BUILD: Use libllvmminimal for tblgen for the host build.
bdrewery [Thu, 1 Sep 2016 18:35:37 +0000 (18:35 +0000)]
DIRDEPS_BUILD: Use libllvmminimal for tblgen for the host build.

The host tools are only ever built for the same reason as TOOLS_PREFIX, for running
during the build.

Sponsored by: EMC / Isilon Storage Division

7 years agoMFV r302993: 7104 increase indirect block size
mav [Thu, 1 Sep 2016 18:33:39 +0000 (18:33 +0000)]
MFV r302993: 7104 increase indirect block size

illumos/illumos-gate@4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1c
https://github.com/illumos/illumos-gate/commit/4b5c8e93cab28d3c65ba9d407fd8f46e3
be1db1c

https://www.illumos.org/issues/7104
  The current default indirect block size is 16KB. We can improve
  performance by increasing it to 128KB. This is especially helpful for
  any workload that needs to read most of the metadata, e.g.
  scrub/resilver, file deletion, filesystem deletion, and zfs send.
  We also need to fix a few space estimation errors to make the tests
  pass.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT
mav [Thu, 1 Sep 2016 18:25:49 +0000 (18:25 +0000)]
MFV r302992: 7071 lzc_snapshot does not fill in errlist on ENOENT

illumos/illumos-gate@25f7d993adbfb3452ac4625b3791670746d35ae3
https://github.com/illumos/illumos-gate/commit/25f7d993adbfb3452ac4625b379167074
6d35ae3

https://www.illumos.org/issues/7071
  upstream
  DLPX-40482 lzc_snapshot does not fill in errlist on ENOENT

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

7 years agoMerge ^/head r305087 through r305219.
dim [Thu, 1 Sep 2016 18:16:45 +0000 (18:16 +0000)]
Merge ^/head r305087 through r305219.