dim [Mon, 30 Jun 2014 20:26:30 +0000 (20:26 +0000)]
MFC r267981:
Pull in r211627 from upstream llvm trunk (by Bill Schmidt):
[PPC64] Fix PR20071 (fctiduz generated for targets lacking that
instruction)
PR20071 identifies a problem in PowerPC's fast-isel implementation
for floating-point conversion to integer. The fctiduz instruction
was added in Power ISA 2.06 (i.e., Power7 and later). However, this
instruction is being generated regardless of which 64-bit PowerPC
target is selected.
The intent is for fast-isel to punt to DAG selection when this
instruction is not available. This patch implements that change.
For testing purposes, the existing fast-isel-conversion.ll test adds
a RUN line for -mcpu=970 and tests for the expected code generation.
Additionally, the existing test fast-isel-conversion-p5.ll was found
to be incorrectly expecting the unavailable instruction to be
generated. I've removed these test variants since we have adequate
coverage in fast-isel-conversion.ll.
This is needed to compile clang with debug+asserts on older powerpc64
and ppc970 targets.
pfg [Mon, 30 Jun 2014 14:12:32 +0000 (14:12 +0000)]
MFC r267544:
Update license to strptime(3) implementation.
Our strptime(3) implementation was the base for the illumos
implementation and after contacting the author, Kevin Rudy
stated the code is under a 2-Clause BSD License [1]
After reviewing our local changes to the file in question,
the FreeBSD Foundation has agreed that their contributions
to this file are not required to carry clause 3 or 4 so
the file can be relicensed as in Illumos [2].
marius [Mon, 30 Jun 2014 09:38:09 +0000 (09:38 +0000)]
MFC: r267967, r267968
- SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4.
- vt_vga(4) is a driver rather than a function so reference it accordingly.
- Uncomment HISTORY section given that vt(4) will first appear in 9.3.
Reviewed by: emaste (modulo last part)
Sponsored by: Bally Wulff Games & Entertainment GmbH
jhb [Fri, 27 Jun 2014 20:39:45 +0000 (20:39 +0000)]
MFC 267291:
Use strcasecmp() instead of strcmp() when checking user-supplied encoding
names so that encoding names are treated as case-insensitive. This allows
the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior
of iconv(1).
jhb [Fri, 27 Jun 2014 20:34:22 +0000 (20:34 +0000)]
MFC 266293:
- Add support for dumping current resource usage for processes via a new -r
flag to procstat.
- Add an -H flag to request information about threads rather than processes
when dumping statistics. Currently it is only used for -r to display
resource usage for individual threads instead of the entire process.
jhb [Fri, 27 Jun 2014 17:22:18 +0000 (17:22 +0000)]
MFC 261781:
Don't waste a page of KVA for the boot-time memory test on x86. For amd64,
reuse the first page of the crashdumpmap as CMAP1/CADDR1. For i386,
remove CMAP1/CADDR1 entirely and reuse CMAP3/CADDR3 for the memory test.
delphij [Fri, 27 Jun 2014 00:37:03 +0000 (00:37 +0000)]
MFC r258941,267839:
Apply vendor improvements to oce(4) driver:
- Add support to 20Gbps, 25Gbps, 40Gbps devices;
- Add support to control adaptive interrupt coalescing (AIC)
via sysctl;
- Improve support of BE3 devices;
- Big endian support fixes;
Many thanks to Emulex for their continued support of FreeBSD.
gjb [Wed, 25 Jun 2014 19:00:11 +0000 (19:00 +0000)]
MFC r267693:
Fix a bug in bsdgrep(1) where patterns are not correctly
detected.
Certain criteria must be met for this bug to show up:
* the -w flag is specified, and
* neither -o or --color are specified, and
* the pattern is part of another word in the line, and
* the other word that contains the pattern occurs first
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.