dim [Mon, 6 Apr 2015 14:50:54 +0000 (14:50 +0000)]
MFC r280864:
Pull in r233552 from upstream libc++ trunk (by Eric Fiselier):
[libcxx] Fix PR22771 - Support access control SFINAE in the library
version of is_convertible.
Summary:
Currently the conversion check does not take place in a context where
access control SFINAE is applied. This patch changes the context of
the test expression so that SFINAE occurs if access control does not
permit the conversion.
Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771
dim [Sun, 5 Apr 2015 15:27:56 +0000 (15:27 +0000)]
Ensure yacc is built during bootstrap-tools for __FreeBSD_version 1001506 and earlier, since some of the ACPI tools now reach yacc's old
maximum table limit. This should fix the Jenkins buildbot, which
apparently runs 10.1-RELEASE.
MFC r258056 (by alc):
Eliminate the gratuitous use of mmap(2) flags from the implementation
of kern_shmat(). Use a simpler approach to determine whether to pass
VMFS_NO_SPACE or VMFS_OPTIMAL_SPACE to vm_map_find().
When catopen(3) returns an error, it caches the result of that error from
r202992. The refcount on the cache entry is not initialized, so any attempt
to clean the cache will skip over this item since it likely has a >0 value.
MFC 276724:
On some Intel CPUs with a P-state but not C-state invariant TSC the TSC
may also halt in C2 and not just C3 (it seems that in some cases the BIOS
advertises its C3 state as a C2 state in _CST). Just play it safe and
disable both C2 and C3 states if a user forces the use of the TSC as the
timecounter on such CPUs.
MFC 261790:
Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge
I/O windows, the default is to preserve the firmware-assigned resources.
PCI bus numbers are only managed if NEW_PCIB is enabled and the architecture
defines a PCI_RES_BUS resource type.
- Add a helper API to create top-level PCI bus resource managers for each
PCI domain/segment. Host-PCI bridge drivers use this API to allocate
bus numbers from their associated domain.
- Change the PCI bus and CardBus drivers to allocate a bus resource for
their bus number from the parent PCI bridge device.
- Change the PCI-PCI and PCI-CardBus bridge drivers to allocate the
full range of bus numbers from secbus to subbus from their parent bridge.
The drivers also always program their primary bus register. The bridge
drivers also support growing their bus range by extending the bus resource
and updating subbus to match the larger range.
- Add support for managing PCI bus resources to the Host-PCI bridge drivers
used for amd64 and i386 (acpi_pcib, mptable_pcib, legacy_pcib, and qpi_pcib).
- Define a PCI_RES_BUS resource type for amd64 and i386.
MFC 260973:
- Reuse legacy_pcib_(read|write)_config() methods in the QPI pcib driver.
- Reuse legacy_pcib_alloc_msi{,x}() methods in the QPI and mptable pcib
drivers.
MFC 278761:
Include OBJT_PHYS VM objects in ELF core dumps. In particular this
includes the shared page allowing debuggers to use the signal trampoline
code to identify signal frames in core dumps.
Revert r280449;
Permit multiple arguments for the nonnull attribute.
For the benefit of anyone that may be struggling to port
FreeBSD to gcc 2.8 (or older) avoid using variadic macros.
MFC r280700 (partial);
Bring new attribute:
__result_use_check
Causes a warning to be emitted if a caller of the function
with this attribute does not use its return value. This is
known in gcc as "warn_unused_result" but we considered the
original naming unsuitable for an attribute.
jhb [Tue, 31 Mar 2015 15:37:24 +0000 (15:37 +0000)]
MFC 278760:
Add two new counters for vnode life cycle events:
- vfs.recycles counts the number of vnodes forcefully recycled to avoid
exceeding kern.maxvnodes.
- vfs.vnodes_created counts the number of vnodes created by successful
calls to getnewvnode().
kib [Tue, 31 Mar 2015 00:57:25 +0000 (00:57 +0000)]
MFC r280435:
When mapping an allocated entry, use the entry size, instead of the
requested size. If tag restrictions caused split entry, its size is
less then requsted.
jhb [Mon, 30 Mar 2015 16:28:04 +0000 (16:28 +0000)]
Revert accidental(?) change in r280455 and do not compile hwpmc statically
into GENERIC by default. This change is not present in HEAD and was not
made in the two commits to HEAD that r280455 merged.
mav [Mon, 30 Mar 2015 07:11:49 +0000 (07:11 +0000)]
MFC r280134:
Report ARAT (APIC-Timer-always-running) feature for virtual CPU.
This makes FreeBSD guest to not avoid using LAPIC timer, preferring HPET
due to worries about non-existing for virtual CPUs deep sleep states.
Benchmarks of usleep(1) on guest and host show such extra latencies:
- 51us for virtual HPET,
- 22us for virtual LAPIC timer,
- 22us for host HPET and
- 3us for host LAPIC timer.
mav [Fri, 27 Mar 2015 08:53:59 +0000 (08:53 +0000)]
MFC r280037:
Rewrite virtio block device driver to work asynchronously and use the block
I/O interface.
Asynchronous operation, based on r280026 change, allows to not block virtual
CPU during I/O processing, that on slow/busy storage can take seconds.
Use of recently improved block I/O interface allows to process multiple
requests same time, that improves random I/O performance on wide storages.
Benchmarks of virtual disk, backed by ZVOL on RAID10 pool of 4 HDDs, show
~3.5 times random read performance improvements, while no degradation on
linear I/O. Guest CPU usage during test dropped from 100% to almost zero.
mav [Fri, 27 Mar 2015 08:52:57 +0000 (08:52 +0000)]
MFC r280026, r280041:
Modify virtqueue helpers added in r253440 to allow queuing.
Original virtqueue design allows queued and out-of-order processing, but
helpers added in r253440 suppose only direct blocking in-order one.
It could be fine for network, etc., but it is a huge limitation for storage
devices.
mav [Fri, 27 Mar 2015 08:51:20 +0000 (08:51 +0000)]
MFC r280004: Give block I/O interface multiple (8) execution threads.
On parallel random I/O this allows better utilize wide storage pools.
To not confuse prefetcher on linear I/O, consecutive requests are executed
sequentially, following the same logic as was earlier implemented in CTL.
Benchmarks of virtual AHCI disk, backed by ZVOL on RAID10 pool of 4 HDDs,
show ~3.5 times random read performance improvements, while no degradation
on linear I/O.
yongari [Thu, 26 Mar 2015 05:07:18 +0000 (05:07 +0000)]
MFC r277050:
Receive filter configuration is done in nge_rxfilter(). Remove
unnecessary filter configuration code in nge_init_locked().
While I'm here add a check for driver running state for multicast
filter handling. Also remove unnecessary assignment to error
variable since it is cleared in the function entry.
yongari [Thu, 26 Mar 2015 04:55:22 +0000 (04:55 +0000)]
MFC r275816:
Fix a bug introdiced in r217548. According to NS DP83815 data
sheet, RX filter should be disabled before programming.
Previously it was clearing wrong bits so RX filter was not
disabled in RX filter configuration.
MFC r277048:
Enable receive filter in sis_rxfilter().
While I'm here add a check for driver running state for multicast
filter handling.
ian [Wed, 25 Mar 2015 20:57:54 +0000 (20:57 +0000)]
MFC r279361, r279395, r279396:
Allow the kern.osrelease and kern.osreldate sysctl values to be set in a
jail's creation parameters. This allows the kernel version to be reliably
spoofed within the jail whether examined directly with sysctl or
indirectly with the uname -r and -K options.
Export the new osreldate and osrelease jail parms in jail_get(2).
arybchik [Wed, 25 Mar 2015 13:48:54 +0000 (13:48 +0000)]
MFC: 280375
sfxge: add barriers to BAR write macros
In theory the barriers are required to cope with write combining and
reordering. Two barriers are added (sometimes merged to one):
1. Before the first write to guarantee that previous writes to the region
have been done
2. Before the last write to guarantee that write to the last dword/qword is
done after previous writes
Barriers are inserted before in the assumption that it is better to
postpone barriers as much as it is possible (more chances that the
operation has already been already done and barrier does not stall CPU).
On x86 and amd64 bus space write barriers are just compiler memory barriers
which are definitely required.
Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2077
arybchik [Wed, 25 Mar 2015 13:47:48 +0000 (13:47 +0000)]
MFC: 280374
sfxge: assert either kernel or internal copy of interface flags
ioctl to put interface down sets ifp->if_flags which holds the intended
administratively defined state and calls driver callback to apply it.
When everything is done, driver updates internal copy of
interface flags sc->if_flags which holds the operational state.
So, transmit from Rx path is possible when interface is intended to be
administratively down in accordance with ifp->if_flags, but not applied
yet and the operational state is up in accordance with sc->if_flags.
Sponsored by: Solarflare Communications, Inc.
Original Differential Revision: https://reviews.freebsd.org/D2075
arybchik [Wed, 25 Mar 2015 13:45:20 +0000 (13:45 +0000)]
MFC: 280163
sfxge: prefetch txq->common if TxQ is started only
Transmit may be called when TxQ is not started yet (i.e. txq->common is
invalid). TxQ state is checked below when mbuf is processed and dropped
if TxQ is not started.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
arybchik [Wed, 25 Mar 2015 13:18:51 +0000 (13:18 +0000)]
MFC: 279351
sfxge: expect required init_state on data path and in periodic calls
With the patch applied the number of instruction events is 1% less and
number of mispredicted branch events is 5% less under multistream TCP
traffic load close to line rate.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
hselasky [Wed, 25 Mar 2015 13:14:25 +0000 (13:14 +0000)]
MFC r280322 and r280429:
The synchronisation value returned by the so-called feedback endpoint
appears to be too inaccurate that it can be used to synchronize the
playback data stream. If there is a recording endpoint associated with
the playback endpoint, use that instead. That means if the isochronous
OUT endpoint is asynchronus the USB audio driver will automatically
start recording, if possible, to get exact information about the
needed sample rate adjustments. In no recording endpoint is present,
no rate adaption will be done.
While at it fix an issue where the hardware buffer pointers don't get
reset at the first device PCM trigger.
Make some variables 32-bit to avoid problems with multithreading.
Use the feedback value from the synchronization endpoint as fallback
when there is no recording channel.