ume [Wed, 25 Jun 2014 17:34:04 +0000 (17:34 +0000)]
MFC r267616:
Retooling addrconfig() to exclude addresses on loopback interfaces
when looking for configured addresses.
This change is based upon the code from the submitter, and made
following changes:
- Exclude addresses assigned on interfaces which are down, like NetBSD
does.
- Exclude addresses assigned on interfaces which are ifdisabled.
jhb [Tue, 24 Jun 2014 19:58:18 +0000 (19:58 +0000)]
MFC 253392:
Workaround some broken BIOSes that specify edge-sensitive but active-low
settings for ACPI-enumerated serial ports by forcing any IRQs that use
an ISA IRQ value with these settings to active-high instead of active-low.
This is known to occur with the BIOS on an Intel D2500CCE motherboard.
rodrigc [Tue, 24 Jun 2014 15:28:09 +0000 (15:28 +0000)]
MFC r263795:
Strict value checking will cause problem.
Bay trail DN2820FYKH is supported on Linux but does not work on FreeBSD.
This behaviour is bug-compatible with Linux-3.13.5.
dim [Tue, 24 Jun 2014 06:12:11 +0000 (06:12 +0000)]
MFC r267704:
Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):
Legalizer: Add support for splitting insert_subvectors.
We handle this by spilling the whole thing to the stack and doing the
insertion as a store.
PR19492. This happens in real code because the vectorizer creates
v2i128 when AVX is enabled.
This fixes a "fatal error: error in backend: Do not know how to split
the result of this operator!" message encountered during compilation of
the net-p2p/libtorrent-rasterbar port.
mav [Mon, 23 Jun 2014 13:19:24 +0000 (13:19 +0000)]
MFC r267392:
Implement simple direct-mapped cache for popular filesystem identifiers to
avoid congestion on global mountlist_mtx mutex in vfs_busyfs(), while
traversing through the list of mount points.
This change significantly improves NFS server scalability, since it had
to do this translation for every request, and the global lock becomes quite
congested.
This code is more optimized for relatively small number of mount points.
On systems with hundreds of active mount points this simple cache may have
many collisions. But the original traversal code in that case should also
behave much worse, so we are not loosing much.
mav [Mon, 23 Jun 2014 13:14:26 +0000 (13:14 +0000)]
MFC r267232, r267239:
Use atomics to modify numvnodes variable.
This allows to mostly avoid lock usage in getnewvnode_[drop_]reserve(),
that reduces number of global vnode_free_list_mtx mutex acquisitions
from 4 to 2 per NFS request on ZFS, improving SMP scalability.
mav [Mon, 23 Jun 2014 13:11:47 +0000 (13:11 +0000)]
MFC r267228:
Split RPC pool threads into number of smaller semi-isolated groups.
Old design with unified thread pool was good from the point of thread
utilization. But single pool-wide mutex became huge congestion point
for systems with many CPUs. To reduce the congestion create several
thread groups within a pool (one group for every 6 CPUs and 12 threads),
each group with own mutex. Each connection during its registration is
assigned to one of the groups in round-robin fashion. File affinify
code may still move requests between the groups, but otherwise groups
are self-contained.
tuexen [Mon, 23 Jun 2014 08:36:48 +0000 (08:36 +0000)]
MFC r267674:
Honor jails for unbound SCTP sockets when selecting source addresses,
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.
marius [Mon, 23 Jun 2014 08:32:45 +0000 (08:32 +0000)]
MFC: r267638
Don't denounce peripherals on system shutdown. Together with r267321
(MFCed to stable/9 in r267777), we're now back to the pre-r228483
level of default verbosity. This in turn again typically allows for
reading information that userland might have printed on the screen
before initiating a halt, but still permits to debug potential device
shutdown problems on system shutdown via CAM_DEBUG etc.
Reviewed by: mav
Sponsored by: Bally Wulff Games & Entertainment GmbH
marius [Mon, 23 Jun 2014 08:28:14 +0000 (08:28 +0000)]
MFC: r267321
Avoid the USB device disconnected and controller shutdown clutter on system
shutdown by putting the former under !rebooting and turning the latter into
debug messages.
Reviewed by: hps
Sponsored by: Bally Wulff Games & Entertainment GmbH
np [Mon, 23 Jun 2014 05:42:52 +0000 (05:42 +0000)]
MFC r267689:
Consider the total number of descriptors available (and not just those
that are ready to be reclaimed) when deciding whether to resume tx after
a stall.
dteske [Fri, 20 Jun 2014 17:57:29 +0000 (17:57 +0000)]
MFC revisions 257795,257817,257819,257937-257938,258264-258265,258267,
258854,259113,259427 (11 revisions; summarized below).
r257795: Replace pkg-tools with pkgng
r257817: Fix cosmetic typos
r257819: Use `pkg -vv' to obtain ABI
r257937: Unbreak the installer
r257938: Remove the env(1) but keep the var
r258264: Kick an unused orphan to the curb ;)
r258265: Improve debugging with f_eval_catch()
r258267: Fix package installation from physical media such as DVD
r258854: Fix PKG_ABI detection after pkg-1.2
r259113: Fix failed attempt to send pkg(8) stderr to /dev/null
r259427: Export 'REPOS_DIR' when selected source medium is cdrom
dim [Sat, 14 Jun 2014 18:48:12 +0000 (18:48 +0000)]
MFC r267335:
In some scenarios, when generating llvm/clang .inc.h files, multiple
source files could be passed to tblgen or clang-tblgen, leading to a
"Too many positional arguments specified" error message. Fix this by
replacing the too-generic ${.ALLSRC} sources with explicit paths.
Reported by: rysto32@gmail.com, rodrigc
Approved by: re (gjb)
delphij [Sat, 14 Jun 2014 00:54:57 +0000 (00:54 +0000)]
MFC r267368:
Apply vendor fixes to the High Point drivers:
- Don't call xpt_free_path() in os_query_remove_device() and
always return TRUE.
- Update os_buildsgl() to support build logical SG table which
will be used by lower RAID module.
- Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target
missing.
Many thanks to HighPoint for providing this driver update.
Submitted by: Steve Chang
Reviewed by: mav
Approved by: re (gjb)
emaste [Thu, 12 Jun 2014 17:08:04 +0000 (17:08 +0000)]
MFC r266208: Speed up pmcstat by improving string hash
In one case generating callgraph output from a 24MB system-wide sampling
data file took 17.4 seconds on average. Profiling showed pmcstat
spending a lot of time in strcmp, due to hash collisions.
Replacing the XOR-only hash with FNV-1a reduces the run time for my
test by 40%.
emaste [Thu, 12 Jun 2014 16:33:06 +0000 (16:33 +0000)]
MFC r267109, r267179: Update vt(4) "Terminus BSD Console" font
"Terminus BSD Console" is a derivative of Terminus that is provided
by Mr. Dimitar Zhekov under the 2-clause BSD license for use by the
FreeBSD vt(4) console.
delphij [Thu, 12 Jun 2014 00:15:07 +0000 (00:15 +0000)]
Cumulative update to arc4random(3).
MFC r227519, r227520, r238118, r241046:
r227519 (das)
Sync the style, comments, and variable names of arc4random.c with
OpenBSD's version (r1.22). No functional changes, as verified with
md5.
r227520 (das)
Further reduce diffs with OpenBSD's arc4random. The main functional
change here is to ensure that when a process forks after arc4random
is seeded, the parent and child don't observe the same random sequence.
OpenBSD's fix introduces some additional overhead in the form of a
getpid() call.
The only significant remaining difference between our arc4random and
OpenBSD's is in how we seed the generator in arc4_stir().
r238118 (pjd):
Prefer sysctl to open/read/close for obtaining random data.
This method is more sandbox-friendly and also should be faster as only
one syscall is needed instead of three.
In case of an error fall back to the old method.
r241046 (jilles)
libc: Use O_CLOEXEC for various internal file descriptors.
hselasky [Wed, 11 Jun 2014 06:45:52 +0000 (06:45 +0000)]
MFC r267240:
Resolve a deadlock setting the USB configuration index from userspace
on USB HUBs by moving the code into the USB explore threads. The
deadlock happens because child devices of the USB HUB don't have the
expected reference count when called from outside the explore
thread. Only the HUB device itself, which the IOCTL interface locks,
gets the correct reference count.
marius [Tue, 10 Jun 2014 09:33:58 +0000 (09:33 +0000)]
MFC: r266821 (partial)
- Actually, modules are built correctly when compiled along the kernel as
they then pick up an opt_global.h from KERNBUILDDIR having PAE defined.
Thus, build all modules by default except those which still really are
defective as of r267058.
- Minor style cleanup.
Document some user-settable make variables in ports.7
This is not a comprehensive list, as the variables themselves are spread
out over multiple files, but it is a start.
Add a section to make.conf noting that variables may be set there that
affect ports builds, but refer to ports.7 and elsewhere for the actual
listing; any listing in make.conf.5 would likely become out of date
fairly quickly.
rmacklem [Mon, 9 Jun 2014 13:52:10 +0000 (13:52 +0000)]
MFC: r267191
The new NFS server would not allow a hard link to be
created to a symlink. This restriction (which was
inherited from OpenBSD) is not required by the NFS RFCs.
Since this is allowed by the old NFS server, it is a
POLA violation to not allow it. This patch modifies the
new NFS server to allow this.
Reported by: jhb
Reviewed by: jhb
Approved by: re (kib)
cxgbe(4): Properly account for the freelist buffers used when returning
early from service_iq due to a budget restriction. This fixes a potential
rx hang when using INTx.
nwhitehorn [Sun, 8 Jun 2014 21:21:54 +0000 (21:21 +0000)]
MFC r260913,266895:
Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the
device is an active kernel console and "off" otherwise. This is designed to
allow serial-booting x86 systems to provide a login prompt on the serial line
by default without providing one on all systems by default. Set this flag
on x86 systems for ttyu0.
Comments and suggestions by: grehan, dteske, jilles
Approved by: re (gjb)
Relnotes: yes
emaste [Thu, 5 Jun 2014 15:18:49 +0000 (15:18 +0000)]
MFC r240938, r240942: Avoid INVARIANTS panic destroying an in-use tap(4)
The requirement (implied by the KASSERT in tap_destroy) that the tap is
closed isn't valid; destroy_dev will block in devdrn while other threads
are in d_* functions.
Note: if_tun had the same issue, addressed in SVN revisions r186391,
r186483 and r186497. The use of the condvar there appears to be
redundant with the functionality provided by destroy_dev.
mav [Thu, 5 Jun 2014 05:58:54 +0000 (05:58 +0000)]
MFC r266538:
Make ng_mppc to not disable the node in case of multiple packet loss.
Quite often it can be just packet reorder, and killing link in such case
is inconvenient. Add few sysctl's to control that behavior.
kib [Thu, 5 Jun 2014 01:00:27 +0000 (01:00 +0000)]
MFC r266846:
When usermode loaded non-default segment selector into the %gs,
correctly prepare KGSBASE msr to restore the user descriptor base on
the last swapgs during return to usermode.
mav [Wed, 4 Jun 2014 18:58:32 +0000 (18:58 +0000)]
MFC r239133 (by jimharris):
During TSC synchronization test, use rdtsc() rather than rdtsc32(), to
protect against 32-bit TSC overflow while the sync test is running.
On dual-socket Xeon E5-2600 (SNB) systems with up to 32 threads, there
is non-trivial chance (2-3%) that TSC synchronization test fails due to
32-bit TSC overflow while the synchronization test is running.
jhb [Wed, 4 Jun 2014 18:32:41 +0000 (18:32 +0000)]
MFC 266281:
Clear the data buffer length field when freeing a command structure so that
it doesn't leak through when the command structure is reused for a user
command without a data buffer.
marius [Wed, 4 Jun 2014 15:05:24 +0000 (15:05 +0000)]
MFC: r266793, r266799, r266808
- Fix compilation with PAE support enabled by merging r233362 and, thus,
doing away with the unnecessary uint8_t pointer casting.
physical addresses.
- Nuke the unused softc of emujoy(4).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
Sponsored by: Bally Wulff Games & Entertainment GmbH
Approved by: re (gjb)