Commit Graph

185828 Commits

Author SHA1 Message Date
Andriy Gapon
55050ab560 use saner calculations in should_yield
This is based on feedback from bde.

MFC after:	6 days
2013-11-26 14:00:50 +00:00
Andriy Gapon
08f6f58999 zfsboottest: properly specify a library dependency
MFC after:	4 days
2013-11-26 13:46:49 +00:00
Hans Petter Selasky
361f264ba0 Style changes. 2013-11-26 11:11:24 +00:00
Andriy Gapon
2ac1eeec44 fix debug.zfs_flags sysctl description in r258638
Pointyhat to:	avg
MFC after:	3 days
2013-11-26 10:57:09 +00:00
Hans Petter Selasky
beb13f0407 Add missing static keyword.
MFC after:	2 weeks
2013-11-26 10:53:12 +00:00
Andriy Gapon
78affb8591 expose zfs_flags as debug.zfs_flags r/w tunable and sysctl
This knob is purposefully hidden under debug.

MFC after:	5 days
Sponsored by:	HybridCluster
2013-11-26 10:46:43 +00:00
Gleb Smirnoff
6882b8ea66 Fix build. 2013-11-26 10:34:34 +00:00
Andriy Gapon
3761ac95f7 MFV r258376: 3964 L2ARC should always compress metadata buffers
illumos/illumos-gate@e4be62a2b7

MFC after:	10 days
Sponsored by:	HybridCluster [merge]
2013-11-26 10:14:23 +00:00
Andriy Gapon
fd51e905e2 MFV r255256: 3954 metaslabs continue to load even after hitting zfs_mg_alloc_failure limit
4080 zpool clear fails to clear pool
4081 need zfs_mg_noalloc_threshold

illumos/illumos-gate@22e30981d8

MFC after:	10 days
Sponsored by:	HybridCluster [merge]
2013-11-26 10:02:02 +00:00
Andriy Gapon
2a4704ab01 MFV r255255: 4045 zfs write throttle & i/o scheduler performance work
illumos/illumos-gate@69962b5647

Please note the following changes:
- zio_ioctl has lost its priority parameter and now TRIM is executed
  with 'now' priority
- some knobs are gone and some new knobs are added; not all of them are
  exposed as tunables / sysctls yet

MFC after:	10 days
Sponsored by:	HybridCluster [merge]
2013-11-26 09:57:14 +00:00
Andriy Gapon
fb8171c240 MFV r247578: 3581 spa_zio_taskq[ZIO_TYPE_FREE][ZIO_TASKQ_ISSUE]->tq_lock is piping hot
illumos/illumos-gate@ec94d32216

MFC after:	9 days
Sponsored by:	HybridCluster [merge]
2013-11-26 09:45:48 +00:00
Andriy Gapon
34140e78ab 734 taskq_dispatch_prealloc() desired
943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP
illumos/illumos-gate@5aeb94743e

Essentially FreeBSD taskqueues already operate in a mode that
was added to Illumos with taskq_dispatch_ent change.
We even exposed the superior FreeBSD interface as taskq_dispatch_safe.
Now we just rename taskq_dispatch_safe to taskq_dispatch_ent and
struct struct ostask to taskq_ent_t, so that code differences will be
minimal.

After this change sys/cddl/compat/opensolaris/sys/taskq.h header is no
longer needed.

Note that this commit is not an MFV because the upstream change was not
individually committed to the vendor area.

MFC after:	8 days
2013-11-26 09:26:18 +00:00
Don Lewis
cfab30ba16 Mention that devd will kldload the driver when the device is connected.
Mention that the automatic mode switch from umass to u3g needed by some
devices does not work unless the driver is loaded before the device is
connected.

MFC after:	1 month
2013-11-26 09:14:39 +00:00
Andriy Gapon
2dbdedbc46 opensolaris taskq: some cosmetic changes
- drop trailing whitespace
- remove redundant "extern" from function declarations
- remove unused macro

MFC after:	1 week
2013-11-26 09:10:01 +00:00
Adrian Chadd
3b64bbd285 Add definitions for the microcode TLV flags entry (type 18.)
This isn't used anywhere just yet!

Obtained from:	Linux iwlwifi
2013-11-26 08:58:08 +00:00
Adrian Chadd
b9066e384d Add a new debug section. 2013-11-26 08:57:25 +00:00
Andriy Gapon
a776a1c1c5 sdt: add support for solaris/illumos style DTRACE_PROBE macros
The new macros are implemented in terms of SDT_PROBE_DEFINE and SDT_PROBE.
Probes defined in this way will appear under SDT provider named "sdt".
Parameter types are exposed via SDT_PROBE_ARGTYPE.
This is something that illumos does not have by default.

This kind of SDT probes is already present in ZFS code, so those probes
will now be available if KDTRACE_HOOKS options is enabled.

A potential future illumos compatibility enhancement is to encode a provider
name as a prefix in a probe name.

Reviewed by:	markj
MFC after:	3 weeks
X-MFC after:	r258622
2013-11-26 08:49:53 +00:00
Andriy Gapon
d9fae5ab88 dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE
In its stead use the Solaris / illumos approach of emulating '-' (dash)
in probe names with '__' (two consecutive underscores).

Reviewed by:	markj
MFC after:	3 weeks
2013-11-26 08:46:27 +00:00
Adrian Chadd
7689abaedc Fix the compat32 sendfile() to be in line with my recent changes.
Reminded by:	kib
2013-11-26 08:32:37 +00:00
Dimitry Andric
ce67429848 Pull in r195558 from upstream clang trunk:
Fix a SSE2 intrinsics typo

  Full discourse at:

   http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html
   http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html

  Patch by Dimitry Andric and Alexey Dokuchaev!

Reported by:	danfe
MFC after:	3 days
2013-11-26 08:07:45 +00:00
Sergey Kandaurov
937353f7fb DragonFly 3.6.0 released. 2013-11-26 08:07:24 +00:00
Li-Wen Hsu
86bd3034ea Mention axge(4)
Approved by:	kevlo
2013-11-26 07:52:40 +00:00
Li-Wen Hsu
b4028281de Also note to add xhci(4) to kernel configuration to utilize USB 3.0
Approved by:	markj
2013-11-26 07:51:38 +00:00
Andreas Tobler
90653c1c5c Take care to handle the full 16 byte buffer in the get/put routines. Also,
skip the VTERM header once when receiving data from the hypervisor call when
we have a HVTERMPROT connection.

MFC after:	1 week
2013-11-26 05:26:10 +00:00
Peter Grehan
4b48ea6ab2 The Data Byte Count (DBC) field of a Physical Region Descriptor
Table is 22 bits, with the bit 31 being the interrupt-on-completion
bit.

OpenBSD and UEFI set this bit, resulting in large block i/o lengths
being sent to bhyve and coredumping the process. Fix by masking off
the relevant 22 bits when using the DBC field as a length.

Reviewed by:	Zhixiang Yu
Discussed with:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
MFC after:	10.0
2013-11-26 03:00:54 +00:00
Adrian Chadd
3287361e38 Refactor out the sendfile copyout in order to make vn_sendfile()
callable from the kernel.

Right now vn_sendfile() can't be called from anything other than
a syscall handler _and_ return the number of bytes queued.
This simply moves the copyout() to do_sendfile() so that any kernel
code can initiate vn_sendfile() outside of a syscall context.

Tested:

* tiny little sendfile program spitting things out a tcp socket

Sponsored by:	Netflix, Inc.
2013-11-26 02:02:05 +00:00
Adrian Chadd
39bb444c76 The bssid can change from underneath us, so take a reference before
we fiddle with it.
2013-11-26 01:30:10 +00:00
Sergey Kandaurov
bb39ffb8c9 Adjust introduction history.
Dump .Dd for this and previous changes.

Discussed with:	trasz
MFC after:	3 days
2013-11-25 23:45:50 +00:00
Neel Natu
d6fe268fdd Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
actual value read by the guest from the device. The IOAPIC ID is now set to
zero in both MPtable/ACPI tables as well as in the ioapic device emulation.

Pointed out by:	grehan@
2013-11-25 23:31:00 +00:00
Sergey Kandaurov
8cb3704a63 iostat: fix extracting TTY statistics from core.
MFC after:	1 week
2013-11-25 22:55:47 +00:00
Adrian Chadd
fa22ce1570 Convert over the TCP probes to use mtod() rather than directly
dereferencing m->m_data.

Sponsored by:	Netflix, Inc.
2013-11-25 22:55:06 +00:00
Peter Wemm
a5b9d9b723 Import apr-util-1.5.3 from vendor branch (rr258600)
This is a minor bug fix release.
2013-11-25 22:20:34 +00:00
Peter Wemm
5bf7090be4 Import apr-util 1.5.3 2013-11-25 22:15:47 +00:00
Pawel Jakub Dawidek
1cef014007 When append-only, immutable or read-only flag is set don't allow for
hard links creation. This matches UFS behaviour.

Reported by:	Oleg Ginzburg <olevole@olevole.ru>
MFC after:	1 month
2013-11-25 21:17:14 +00:00
Pawel Jakub Dawidek
a9554102f9 Fix double free().
Reported by:	Coverity
Coverity CID:	1130048
2013-11-25 20:45:30 +00:00
Devin Teske
84dfba8d18 Sort messages. 2013-11-25 20:37:53 +00:00
Craig Rodrigues
6274ce3e2b In vnet_route_uninit(), free some memory that is allocated in vnet_route_init().
To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       see: http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html
            http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021291.html

This doesn't eliminate all the "Freed UMA keg was not empty" warning messages
on the console, but it helps.
2013-11-25 20:33:33 +00:00
Devin Teske
1833362dc3 Add missing newline to printf format string. 2013-11-25 20:29:26 +00:00
Devin Teske
f18d3c4116 Add missing $' before variable name pgm'. Unnoticed unless running
parallel concurrent copies of `bsdconfig syscons_ttys'.
2013-11-25 20:28:39 +00:00
Craig Rodrigues
d04dc94cac In sys/netpfil/ipfw/ip_fw_nat.c:vnet_ipfw_nat_uninit() we call "IPFW_WLOCK(chain);".
This lock gets deleted in sys/netpfil/ipfw/ip_fw2.c:vnet_ipfw_uninit().

Therefore, vnet_ipfw_nat_uninit() *must* be called before vnet_ipfw_uninit(),
but this doesn't always happen, because the VNET_SYSINIT order is the same for both functions.
In sys/net/netpfil/ipfw/ip_fw2.c and sys/net/netpfil/ipfw/ip_fw_nat.c,
IPFW_SI_SUB_FIREWALL == IPFW_NAT_SI_SUB_FIREWALL == SI_SUB_PROTO_IFATTACHDOMAIN
and
IPFW_MODULE_ORDER == IPFW_NAT_MODULE_ORDER

Consequently, if VIMAGE is enabled, and jails are created and destroyed,
the system sometimes crashes, because we are trying to use a deleted lock.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Fix the problem by increasing the value of IPFW_NAT_SI_SUB_FIREWALL,
so that vnet_ipfw_nat_uninit() runs after vnet_ipfw_uninit().
2013-11-25 20:20:34 +00:00
Peter Wemm
db2af39373 Move the iconv wrapper source from libc_nonshared to libc/iconv so that
it is all in the one place again.  Rename libc/iconv/iconv.c to
bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT
works again.

Discussed with:	kib (and partly stolen from his patch)
2013-11-25 20:17:55 +00:00
Eitan Adler
c0fafb2882 Add missing cards now supported by iwn. 2013-11-25 20:03:57 +00:00
Hiroki Sato
33888c08dd There is no file under SISSL after license replacement in r258581. 2013-11-25 19:24:15 +00:00
Hiroki Sato
44443e425f Replace Sun Industry Standards Source License for Sun RPC code with a
3-clause BSD license as specified by Oracle America, Inc. in 2010.
This license change was approved by Wim Coekaerts, Senior Vice
President, Linux and Virtualization at Oracle Corporation.
2013-11-25 19:08:38 +00:00
Hiroki Sato
d9f4d21bdd Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
with the explicit permission of Sun Microsystems in 2009.
2013-11-25 19:07:44 +00:00
Neel Natu
08e3ff329a Add HPET device emulation to bhyve.
bhyve supports a single timer block with 8 timers. The timers are all 32-bit
and capable of being operated in periodic mode. All timers support interrupt
delivery using MSI. Timers 0 and 1 also support legacy interrupt routing.

At the moment the timers are not connected to any ioapic pins but that will
be addressed in a subsequent commit.

This change is based on a patch from Tycho Nightingale (tycho.nightingale@pluribusnetworks.com).
2013-11-25 19:04:51 +00:00
Hiroki Sato
2e322d3796 Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
with the explicit permission of Sun Microsystems in 2009.
2013-11-25 19:04:36 +00:00
Craig Rodrigues
c0c61281b4 Only initialize some mutexes for the default VNET.
In r208160, sctp_it_ctl was made a global variable, across all VNETs.
However, sctp_init() is called for every VNET that is created.  This results
in the same global mutexes which are part of sctp_it_ctl being initialized.  This can result
in crashes if many jails are created.

To reproduce the problem:
  (1)  Take a GENERIC kernel config, and add options for: VIMAGE, WITNESS,
       INVARIANTS.
  (2)  Run this command in a loop:
       jail -l -u root -c path=/ name=foo persist vnet && jexec foo ifconfig lo0 127.0.0.1/8 && jail -r foo

       (see http://lists.freebsd.org/pipermail/freebsd-current/2010-November/021280.html )

Witness will warn about the same mutex being initialized.

Fix the problem by only initializing these mutexes in the default VNET.
2013-11-25 18:49:37 +00:00
Pedro F. Giffuni
340b342723 MFV: removes strict-aliasing warnings from GCC in tcpdump.
Reported by:	tinderbox (gjb)
Submitted by:	glebius
MFC after:	2 weeks
2013-11-25 18:46:08 +00:00
Ryan Stone
9b605dd32e pmc(3) does not document a dependency on <sys/types.h> but <pmc.h>
requires it, so include it explicitly from <pmc.h>.

MFC after:	1 month
2013-11-25 18:31:13 +00:00