Commit Graph

196449 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
01de1a0650 Add devd(8) notifications for creation and destruction of GEOM devices.
Differential Revision:	https://reviews.freebsd.org/D1211
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-14 11:15:57 +00:00
Alexander Motin
d4f46a775d Reimplement TRIM throttling added in r248577.
Previous throttling implementation approached problem from the wrong side.
It significantly limited useful delaying of TRIM requests and aggregation
potential, while not so much controlled TRIM burstiness under heavy load.

With this change random 4K write benchmarks (probably the worst case for
TRIM) show me IOPS increase by 20%, average latency reduction by 30%, peak
TRIM bursts reduction by 3 times and same peak TRIM map size (memory usage).

Also the new logic does not force map size down so heavily, really allowing
to keep deleted data for 32 TXG or 30 seconds under moderate load.  It was
practically impossible with old throttling logic, which pushed map down to
only 64 segments.

Reviewed by:	smh
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2015-01-14 09:39:57 +00:00
Neel Natu
07820b4b4c Fix typo (missing comma).
MFC after:	3 days
2015-01-14 07:18:51 +00:00
Justin Hibbits
b5d4909ec3 Make use of the new Altivec ptrace support, to save the Altivec registers in
gcore.

MFC after:	2 weeks
Relnotes:	yes
2015-01-14 07:02:21 +00:00
Justin Hibbits
64b83a0576 Add Altivec/VMX register support to ptrace.
MFC after:	2 weeks
Relnotes:	yes
2015-01-14 07:01:21 +00:00
Hans Petter Selasky
930a420683 Fix spelling. 2015-01-14 06:46:25 +00:00
Warner Losh
8b91d5b008 Various interrelated fixes to make suspend / resume work better. We now
can suspend / resume and unload / load cbb and cardbus without errors
on my Lenovo T400, which wasn't possible before. Cards suspending
and resuming in the CardBus slot not yet tested.
o Enable memory cycles to the bridge early (as part of the new
  cbb_pci_bridge_init). This fixes the Bad VCC errors which were
  caused by the code accessing the device registers with this
  cleared. The suspend / resume process clears it.
o Refactor suspend / resume into bus specific code (though the ISA
  code is just stubbed). This isn't strictly necessary, but makes
  the initializaiton code more uniform and should be more bullet
  proof in the face of variant behavior among cardbus bridges.
o Fixup comments in the power-up sequence to reflect reality. These
  comments were written for one regime of power-up, but not updated
  as things were revised.
o Add a paranoid small delay (100ms) to cover noisy cards powering
  down.
o Fix some debugging prints to be easier to grep from dmesg.

Sponsored by: Netflix
2015-01-14 05:41:33 +00:00
Warner Losh
8bf007e1e6 Add a rather obnoxious warning if you don't have NEW_PCIB defined
since it's a total crap shoot if things will work.
2015-01-14 05:41:31 +00:00
Warner Losh
5355ab2008 On x86 force NEW_PCIB, since that's the default. While this option
would be picked up for kernel builds, it isn't picked up for
old-fashioned builds. Without this option, PCI bus numbers are busted
for modules build iteratively.
2015-01-14 05:41:28 +00:00
Jamie Gritton
6a3f277901 Remove the prison flags PR_IP4_DISABLE and PR_IP6_DISABLE, which have been
write-only for as long as they've existed.
2015-01-14 04:50:28 +00:00
Jamie Gritton
0e5e396ede Don't set prison's pr_ip4s or pr_ip6s to -1.
PR:		196474
MFC after:	3 days
2015-01-14 03:52:41 +00:00
Nathan Whitehorn
bf27800837 Do not remap Open Firmware mappings covered by the direct map. It's
pointless and wastes resources.

MFC after:	1 week
2015-01-14 02:18:29 +00:00
Ganbold Tsagaankhuu
d84d6e7716 Correct cpu type, it was rather Cortex A12 R0.
Approved by:    stas (mentor)
2015-01-14 01:23:50 +00:00
Jack F Vogel
df1d7a71d4 Cleanup some bogus code in the RSS config, and add the include
for the rss option file. And bump the version.

MFC after:	1 week
2015-01-13 22:13:30 +00:00
Neel Natu
c9c75df48c 'struct vm_exception' was intended to be used only as the collateral for the
VM_INJECT_EXCEPTION ioctl. However it morphed into other uses like keeping
track pending exceptions for a vcpu. This in turn causes confusion because
some fields in 'struct vm_exception' like 'vcpuid' make sense only in the
ioctl context. It also makes it harder to add or remove structure fields.

Fix this by using 'struct vm_exception' only to communicate information
from userspace to vmm.ko when injecting an exception.

Also, add a field 'restart_instruction' to 'struct vm_exception'. This
field is set to '1' for exceptions where the faulting instruction is
restarted after the exception is handled.

MFC after:      1 week
2015-01-13 22:00:47 +00:00
Dimitry Andric
39a9ae0f39 Since the merge of file 5.21 in r276415 and r276416, stable/9 and
stable/10 cannot be built from FreeBSD 8.x.  This is because the
build-tools stage requires libmagic, but lib/libmagic/config.h was
generated on head, and it now enables using the xlocale.h APIs, which
are not supported on 8.x (and on 9.x before __FreeBSD_version 900506).

See also the start of this thread on -stable:
https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html

To fix this, conditionalize the use of xlocale.h APIs to make
bootstrapping from older FreeBSD versions work correctly.

Reviewed by:	delphij
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1518
2015-01-13 20:37:57 +00:00
Dimitry Andric
8028b78dbf Connect libclang_rt to the build, for specific architectures. This
contains the libraries for Address Sanitizer (asan), Undefined Behavior
Sanitizer (ubsan) and Profile Guided Optimization.

ASan is a fast memory error detector. It can detect the following types
of bugs:

    Out-of-bounds accesses to heap, stack and globals
    Use-after-free
    Use-after-return (to some extent)
    Double-free, invalid free
    Memory leaks (experimental)

Typical slowdown introduced by AddressSanitizer is 2x.

UBSan is a fast and compatible undefined behavior checker. It enables a
number of undefined behavior checks that have small runtime cost and no
impact on address space layout or ABI.

PLEASE NOTE: the sanitizers still have some rough edges on FreeBSD,
particularly on i386.  These will hopefully be smoothed out in the
coming time.

Differential Revision: https://reviews.freebsd.org/D1505
2015-01-13 19:54:47 +00:00
Jack F Vogel
6b30e6ae6c Complete the RX side RSS code: parse the encoded portion of the RX
descriptor to determine the correct hash type.

MFC after:1 week
2015-01-13 18:56:29 +00:00
Hans Petter Selasky
b78e84d132 Resolve a special case deadlock: When two or more threads are
simultaneously detaching kernel drivers on the same USB device we can
get stuck in the "usb_wait_pending_ref_locked()" function because the
conditions needed for allowing detach are not met. The "destroy_dev()"
function waits for all system calls involving the given character
device to return. Character device system calls may lock the USB
enumeration lock, which is also held when "destroy_dev()" is
called. This can sometimes lead to a deadlock not noticed by
WITNESS. The current solution is to ensure the calling thread is the
only one holding the USB enumeration lock and prevent other threads
from getting refs while a USB device detach is ongoing. This turned
out not to be sufficient. To solve this deadlock we could use
"destroy_dev_sched()" to schedule the device destruction in the
background, but then we don't know when it is safe to free() the
private data of the character device. Instead a callback function is
executed by the USB explore process to kill off any leftover USB
character devices synchronously after the USB device explore code is
finished and the USB enumeration lock is no longer locked. This makes
porting easier and also ensures us that character devices must
eventually go away after a USB device detach.

While at it ensure that "flag_iserror" is only written when "priv_mtx"
is locked, which is protecting it.

MFC after:	5 days
2015-01-13 16:37:43 +00:00
Navdeep Parhar
e503548810 cxgbe/iw_cxgbe: fix whitespace nit in r277102.
Reported by:	stefanf@
2015-01-13 16:18:31 +00:00
Hans Petter Selasky
409656193f Add new USB template to the USB bootloader module. 2015-01-13 16:06:38 +00:00
Ed Maste
93e0d5cabf libdwarf: add missing break
Reported by:	Coverity
CID:		1193315
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-01-13 15:18:54 +00:00
Ruslan Bukin
eff43c7467 Rename Exynos UART driver. No functional change.
Submitted by:	Michal Meloun <meloun@miracle.cz>
2015-01-13 15:04:28 +00:00
Hans Petter Selasky
27f9c0b3d9 Add new USB template to the USB template module. 2015-01-13 14:26:05 +00:00
Bjoern A. Zeeb
a2cf30b916 Move the vsi variable outside of the #ifdef block to unbreak NOIP kernels
after r277084.

MFC after:	6 days
X-MFC with:	r277084
2015-01-13 14:15:00 +00:00
Ruslan Bukin
3e420a3e12 Add usb template SERIALNET allowing us to have both USB CDC Ethernet
and USB CDC Modem same time by single cable.

Reviewed by:	hselasky@
2015-01-13 14:03:56 +00:00
Edward Tomasz Napierala
b43dc82c6b Fix detection of ext2/ext3 filesystems that lack labels.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-13 13:59:48 +00:00
Hans Petter Selasky
9570004318 Don't use POLLNVAL as a return value from the client side poll
function. Many existing clients don't understand POLLNVAL and instead
relies on an error code from the read(), write() or ioctl() system
call. Also make sure we wakeup any client pollers before the cuse
server is closing, so they don't wait forever for an event.
2015-01-13 13:32:18 +00:00
Konstantin Belousov
43d5c9f65a Complete r277100: add AHCI_Q_ABAR0 tp AHCI_Q_BIT_STRING.
Noted and reviewed by:	smh
MFC after:	6 days
2015-01-13 09:50:15 +00:00
Ganbold Tsagaankhuu
cebf67b056 Add CPU ID for ARM Cortex A17.
Approved by:    stas (mentor)
2015-01-13 07:49:07 +00:00
Gleb Smirnoff
9ff0137ec1 Remove unused variables.
CID:	1262431
CID:	1262430
2015-01-13 06:56:04 +00:00
Gleb Smirnoff
01f3b262c4 - Remove unused variable.
- Wrap long line.
2015-01-13 06:22:55 +00:00
Gleb Smirnoff
22064c8f39 Remove unused fields. 2015-01-13 06:22:24 +00:00
Xin LI
25baf019f1 Use the common codepath to handle SIOCGIFADDR.
Before this change, the current code handles SIOCGIFADDR the same
way with SIOCSIFADDR, which involves full arp_ifinit, et al.  They
should be unnecessary for SIOCGIFADDR case.

Differential Revision: https://reviews.freebsd.org/D1508
Reviewed by:	glebius
MFC after:	2 weeks
2015-01-13 05:32:51 +00:00
Navdeep Parhar
b3e112f962 cxgbe/iw_cxgbe: allow any size during the initial MPA exchange.
MFC after:	1 month
2015-01-13 01:40:12 +00:00
Warner Losh
0ac665747d Explain a bit of tricky code dealing with trims and how it prevents
starvation. These side effects aren't obvious without extremely
careful study, and are important to do just so.
2015-01-13 00:20:35 +00:00
Konstantin Belousov
378c532c1f Add quirk to override default BAR(5) rid for AHCI.
Use it for Cavium AHCI.

Submitted by:	Michaе┌ Stanek
Reviewed by:	imp (previous version)
MFC after:	1 week
2015-01-13 00:11:56 +00:00
Pedro F. Giffuni
a161398ab8 Replace __inline GNUism with the standard inline.
MFC after:	1 week
2015-01-13 00:04:22 +00:00
Zbigniew Bodek
4b3d916086 Introduce ofw_bus_reg_to_rl() to replace part of common bus code
Instead of reusing the same reg parsing code, create one, common function
that puts reg contents to the resource list. Address cells and size cells
are passed rather than acquired here so that any bus can have different
default values.

Obtained from:   Semihalf
Reviewed by:     andrew, ian, nwhitehorn
Sponsored by:    The FreeBSD Foundation
2015-01-13 00:00:09 +00:00
John-Mark Gurney
bacaccae69 fix IV size of XTS to be correct at 8 bytes.. That is what both the
AES-NI code and the software code expects..
2015-01-12 23:33:40 +00:00
Alexander Motin
5b3a65823d Skip extra bcopy() when scrubbing vdev without redundancy.
According to profiler, this bcopy() can use about 10% of CPU time.

MFC after:	2 weeks
2015-01-12 22:38:55 +00:00
Gleb Smirnoff
7e310d2d50 In miibus(4) drivers provide functions that allow to get NIC
driver name and NIC driver softc via the device(9) tree,
instead of going dirty through the ifnet(9) layer.

Differential Revision:	D1506
Reviewed by:		imp, jhb
2015-01-12 22:27:38 +00:00
Ed Maste
4882501b5c ANSIfy msdosfs
Add a few cases and style(9) fixes missed in r276887

Sponsored by:	The FreeBSD Foundation
2015-01-12 21:55:48 +00:00
Dimitry Andric
39107d9a91 Pull in r225610 from upstream compiler-rt trunk (by Roman Divacky):
Add FreeBSD support for __clear_cache.
2015-01-12 21:28:10 +00:00
Jack F Vogel
845a028fa3 Missing RSS support added, this fixes the build, but the code
in the RX side was complicated by recent changes and will need
some further tweaking.
2015-01-12 20:59:07 +00:00
Christian Brueffer
8b36eba6c0 Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf.
The error exists in the NetBSD upstream version as well and will be reported back.

PR:		196598
Submitted by:	Dan McGregor
MFC after:	1 week
2015-01-12 19:26:31 +00:00
Jack F Vogel
393c4bb1ba Intel I40E driver updates:
if_ixl to version 1.3.0, if_ixlv to version 1.2.0
	- Major change in both drivers is to add RSS support
	- In ixl fix some interface speed related issues, dual
	  speed was not changing correctly, KR/X media was not
	  displaying correctly (this has a workaround until a
	  more robust media handling is in place)
	- Add a warning when using Dell NPAR and the speed is
	  less than 10G
	- Wrap a queue hung message in IXL_DEBUG, as it is non-fatal,
	  and without tuning can display excessively

MFC after: 1 week
2015-01-12 18:43:34 +00:00
Jack F Vogel
f247dc2523 Update to the shared code for Intel I40E drivers in preparation
for the ixl 1.3.0 and ixlv 1.2.0 revisions.

MFC after:	1 week
2015-01-12 18:32:45 +00:00
Ed Maste
4b12fb6103 Remove duplicate copies of trivial getcontextx.c
Only i386 and amd64 provide a non-trivial __getcontextx(). Use a common
trivial implementation in gen/ for other architectures, rather than
copying the file to each MD subdirectory.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D1472
2015-01-12 18:13:38 +00:00
Gleb Smirnoff
fc2517100b Do not go one layer down to check ifqueue length. First, not all drivers
use ifqueue at all. Second, there is no point in this lockless check.
Either positive or negative result of the check could be incorrect after
a tick.

Reviewed by:	tuexen
Sponsored by:	Nginx, Inc.
2015-01-12 18:06:22 +00:00