summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r308064:mckusick2016-11-261-10/+12
| | | | | Avoid possible overflow when calclating malloc size for auxillary data structure sizes when mounting and reloading UFS/FFS filesystems.
* MFC 307333: Reprogram I/O APIC interrupt pins when registering an I/O APIC.jhb2016-11-251-2/+9
| | | | | | | | | | | | | | | | All I/O APIC pins are masked when an I/O APIC is first probed. The APIC enumerator (MP Table or MADT) then parses its associated tables to configure individual pins to set custom delivery modes or alternate routing (e.g. routing IRQ 0 to intpin 2). Pins for regular interrupt pins are left masked until the first interrupt is assigned. However, pins with unusual settings (e.g. NMI or SMI) are never assigned an interrupt and thus never re-programmed. The I/O APIC code used to reprogram all interrupt pins during registration but this was lost in r151979. In theory, this is mostly a no-op as the ACPI APIC table does not include a way to enumerate NMI or SMI pins for the I/O APIC, so only systems using an MP Table would be affected.
* MFC r286227, r286443:jch2016-11-2415-247/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r286227: Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability: - The existing TCP INP_INFO lock continues to protect the global inpcb list stability during full list traversal (e.g. tcp_pcblist()). - A new INP_LIST lock protects inpcb list actual modifications (inp allocation and free) and inpcb global counters. It allows to use TCP INP_INFO_RLOCK lock in critical paths (e.g. tcp_input()) and INP_INFO_WLOCK only in occasional operations that walk all connections. PR: 183659 Differential Revision: https://reviews.freebsd.org/D2599 Reviewed by: jhb, adrian Tested by: adrian, nitroboost-gmail.com Sponsored by: Verisign, Inc. r286443: Fix a kernel assertion issue introduced with r286227: Avoid too strict INP_INFO_RLOCK_ASSERT checks due to tcp_notify() being called from in6_pcbnotify(). Reported by: Larry Rosenman <ler@lerctr.org> Submitted by: markj, jch
* MFC r308772: crunchide: report explicit error for combined string tableemaste2016-11-241-0/+4
| | | | | | | | | | | Some tools produce objects with a combined strtab and shstrtab. These objects are not supported by crunchide since it rewrites the symtab and strtab to "hide" symbols. This invalidates section header offsets into a combined strtab/shstrtab. In the future we could support these objects (by ensuring that we retain unmodified section name strings in the output .strtab, and then rewriting each section header's sh_name).
* MFC 308056: Fix formatting of tables.jhb2016-11-231-123/+123
| | | | | | | | | | | Specifically, use .Ta instead of tabs to separate column entries. While here fix a few other things: - Use .Sy for all column headers (previously only the first column header was bold) - Use .Dv to markup constants used for MIB names. - Use "1234" and "4321" for the byte order descriptions without thousands separators. - Mark up header files in the first table with .In.
* MFC 307975: Enable EFER_NXE properly on APs.jhb2016-11-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | EFER_NXE is set in the EFER MSR by initializecpu() and must be set on all CPUs in the system. When PG_NX support was added to PAE on i386, the block to enable EFER_NXE was placed in a section of initializecpu() that only runs if 'cpu == CPU_686'. During early boot, locore does an initial pass to set cpu that sets it to CPU_686 on all CPUs later than a Pentium. Later, printcpuinfo() adjusts the 'cpu' variable on PII and later CPUs to one of CPU_PII, CPU_PIII, or CPU_P4. However, printcpuinfo() is called after initializecpu() on the BSP, so the BSP would enable EFER_NXE and pg_nx. The APs execute initializecpu() much later after printcpuinfo() has run. The end result on a modern CPU was that cpu was set to CPU_PIII when the APs invoked initializecpu(), so they did not enable EFER_NXE. As a result, the APs would fault when trying to access any pages marked with PG_NX set. When booting a 2 CPU PAE kernel in bhyve this manifested as a hang before single user mode. The attempt to execute /bin/init tried to copy out the exec strings (argv, etc.) to a non-executable mapping while running on the AP. The instruction kept faulting due to invalid bits in the PTE in an infinite loop. Fix this by moving the code to enable EFER_NXE out of the switch statement on 'cpu' and always doing it if 'amd_feature' supports AMDID_NX.
* MFC r308689:kib2016-11-2318-4/+142
| | | | | | | | | | Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the ifunc resolvers on x86. MFC r308925: Adjust r308689 to make rtld compilable with either in-tree or (hopefully) stock gcc 4.2.1 on i386 and other arches.
* MFC r308733:kib2016-11-231-30/+50
| | | | | | Move the fast fault path into the separate function. Tested by: pho
* MFC r308425: Add support for EIIOE flag in Additional Element Status.mav2016-11-232-9/+21
| | | | | It was added in SES-3 spec, and its support required to properly link the Additional Element Status page data to the original elements.
* MFC r307584 (partially)asomers2016-11-221-0/+14
| | | | | | | | | | | | | | | | | | | | 307584 added the __min_size macro and replaced some static array sizes with __min_size. However, stable/10 doesn't yet have any static array sizes, so all this MFC does is add the __min_size macro. Original commit message: Fix C++ includability of crypto headers with static array sizes C99 allows array function parameters to use the static keyword for their sizes. This tells the compiler that the parameter will have at least the specified size, and calling code will fail to compile if that guarantee is not met. However, this syntax is not legal in C++. This commit reverts r300824, which worked around the problem for sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can be used in headers as a static array size, but will still compile in C++ mode.
* MFC 306999: Add a missing word.jhb2016-11-221-1/+1
|
* MFC r308957: MFV r308954:delphij2016-11-22183-3780/+7374
| | | | | | ntp 4.2.8p9. Approved by: so
* MFC r308688:kib2016-11-221-1/+1
| | | | Assert that there is no unresolved symbols during rtld linking.
* MFC r308687:kib2016-11-221-1/+1
| | | | Update hint to utilize user variable.
* MFC r307978:mckusick2016-11-221-20/+39
| | | | | | | Bug 180894 reports that rm -rf on a directory causes kernel panic and reboot. Return EINVAL rather than panic for low directory link count. PR: 180894
* MFC r308642:kib2016-11-211-6/+5
| | | | | | Initialize reserved bytes in struct mq_attr. PR: 214488
* MFC r308089: zfsbootcfg: a simple tool to set next boot (one time)avg2016-11-2115-9/+488
| | | | | | | options for zfsboot There is a branch-specific change in sbin/zfsbootcfg/Makefile because of LIBADD vs LDADD/DPADD.
* MFC r307755: swapoff: Remove only late devices with -aL.jilles2016-11-203-2/+12
| | | | | | | | | | | | | | | Currently, '/etc/rc.d/swaplate stop' removes all swap devices. This can be very slow and may not even be possible if there is a lot of swap space in use. However, removing swap devices is only needed for late swap devices that may depend on daemons that subsequent shutdown steps stop. Normal swap devices such as hard disk partitions will remain available throughout the shutdown process and need not be removed. In swapoff, interpret -aL to remove late swap devices only, and use this in etc/rc.d/swaplate. The meaning of -aL in swapon remains unchanged (add all swap devices, both normal and late). PR: 187081
* MFC r306585: swapon(8): Update to reality: swapoff ignores -L and the latejilles2016-11-191-9/+1
| | | | option in fstab.
* MFC r307752asomers2016-11-183-0/+8
| | | | Close some file descriptor leaks in pw
* MFC r306740, r307150: groff: use changelog date in man pagesemaste2016-11-182-1/+10
| | | | | | | | | | | | | | | | | | | | | | r306740: groff: use changelog date rather than file modification date in man pages The source checkout date is not particularly relevant, and this makes groff man pages build reproducibly. r307150: Avoid using 'head' in generating groff doc date It may not be available in certain cross build cases. Note that this is a slight change in functionality, in that now only the first line of the source ChangeLog file is processed. This is acceptable as groff will be retired and we won't encounter a possibly-different ChangeLog format. Sponsored by: The FreeBSD Foundation
* MFC r282824: crunchide: remove EOL whitespaceemaste2016-11-181-3/+3
|
* MFC r308538:kib2016-11-181-1/+1
| | | | Increase the max allowed size of the microcode update blob for x86.
* MFC r308040,308479: nap time between pats is forced to be at most halfavg2016-11-171-9/+14
| | | | | | | of the timeout Note that in this branch the default nap period is 1 second unlike the head where the period is 10 seconds.
* Revert r308753: some unrelated changes were included into the commitavg2016-11-172-30/+25
|
* MFC r308247: MFV r308222: 6051 lzc_receive: allow the caller to read theavg2016-11-172-8/+41
| | | | begin record
* MFC r308218: Add support for microcode update on newer AMD CPUs (10h+)avg2016-11-175-30/+374
|
* MFC r308101: hwpmc: fix a race between amd_stop_pmc and amd_intravg2016-11-171-1/+2
|
* MFC r307195: convert iicsmb to use iicbus_transfer for all operationsavg2016-11-171-168/+142
|
* MFC r308040,308479: nap time between pats is forced to be at most halfavg2016-11-172-25/+30
| | | | | | | of the timeout Note that in this branch the default nap period is 1 second unlike the head where the period is 10 seconds.
* MFC r308464, r308471: Add some device IDs found in my new laptop.mav2016-11-165-0/+16
|
* MFC r308348:hrs2016-11-161-0/+4
| | | | | | Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE. Reported by: philip
* MFC r308347:hrs2016-11-161-0/+3
| | | | | | | | Fix an infinite loop at an non-responding hop when other echo replies are kept arriving in the waittime time window. Submitted by: Denny Page PR: 210286
* MFC r308416:hselasky2016-11-153-2/+12
| | | | | | | | | | | Add timer to watch the RQ when we are out of mbufs. The firmware/hardware does not generate additional completion events unless we post new buffers. Use a timer to try to post more buffers in case we are temporarily out of mbufs. Else the receive schedule completely stops. Sponsored by: Mellanox Technologies
* MFC r308414:hselasky2016-11-155-43/+467
| | | | | | | Add more firmware related structures and update existing ones in the MLX5 core module. Update the set and query diagnostics counter API. Sponsored by: Mellanox Technologies
* MFC r308413:hselasky2016-11-151-1/+5
| | | | | | | Query flow table capabilities according to the correct capability bit for infiniband. Sponsored by: Mellanox Technologies
* MFC r308412:hselasky2016-11-151-4/+5
| | | | | | | Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields in question are currently not used. Sponsored by: Mellanox Technologies
* MFC r308411:hselasky2016-11-151-5/+5
| | | | | | | | Ensure the firmware is notified of any host memory allocation failures. Else firmware commands may time out waiting for host memory. Sponsored by: Mellanox Technologies
* MFC r308409:hselasky2016-11-151-1/+4
| | | | | | | When a firmware command times out do not free the command structure to avoid use after free. Sponsored by: Mellanox Technologies
* MFC r308133, r308134: Fix wrong copy/paste in error message.mav2016-11-141-2/+2
|
* MFC r308173:mav2016-11-123-5/+14
| | | | | | | | | Fix ZIL records ordering when ZVOL opened both with and without FSYNC. Before this an earlier writes to a ZVOL opened without FSYNC could get to ZIL after later writes to the same ZVOL opened with FSYNC. Fix this by replicating functionality of ZPL (zv_sync_cnt equivalent to z_sync_cnt), marking all log records sync if anybody opened the ZVOL with FSYNC.
* MFC r308169:mav2016-11-121-5/+7
| | | | | | | Pass to zvol_log_truncate() same sync values as to zvol_log_write(). Surplus marking of TX_TRUNCATE records as sync could result in putting them into ZIL before previous writes if ones were async.
* MFC r308055: Add vdev_reopening support to vdev_geom.mav2016-11-121-1/+12
| | | | | | | It allows to avoid extra GEOM providers flapping without significant need. Since GEOM got resize support, we don't need to reopen provider to get new size. If provider was orphaned and no longer valid, ZFS should already know that, and in such case reopen should be done in full as expected.
* MFC r308051: Matching GUIDs, handle possible race on vdev detach.mav2016-11-121-56/+63
| | | | | | | | | | | | | | | | In case of vdev detach, causing top level mirror vdev destruction, leaf vdev changes its GUID to one of the destroyed mirror, that creates race condition when GUID in vdev label may not match one in the pool config. This change replicates logic nuance of vdev_validate() by adding special exception, matching the vdev GUID against the top level vdev GUID. Since this exception is not completely reliable (may give false positives if we fail to erase label on detached vdev), use it only as last resort. Quick way to reproduce this scenario now is detach vdev from a pool with enabled autoextend. During vdev detach autoextend logic tries to reopen remaining vdev, that always fails now since in-memory configuration is already updated, while on-disk labels are not yet.
* MFC r308049: Improve few debugging log messages.mav2016-11-121-3/+3
|
* MFC r307318: MFV r307314:mav2016-11-121-20/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6988 spa_sync() spends half its time in dmu_objset_do_userquota_updates Using a benchmark which creates 2 million files in one TXG, I observe that the thread running spa_sync() is on CPU almost the entire time we are syncing, and therefore can be a performance bottleneck. About 50% of the time in spa_sync() is in dmu_objset_do_userquota_updates(). The problem is that dmu_objset_do_userquota_updates() calls zap_increment_int(DMU_USERUSED_OBJECT) once for every file that was modified (or created). In this benchmark, all the files are owned by the same user/group, so all 2 million calls to zap_increment_int() are modifying the same entry in the zap. The same issue exists for the DMU_GROUPUSED_OBJECT. We should keep an in-memory map from user to space delta while we are syncing, and when we finish, iterate over the in-memory map and modify the ZAP once per entry. This reduces the number of calls to zap_increment_int() from "number of objects modified" to "number of owners/groups of modified files". This reduced the time spent in spa_sync() in the file create benchmark by ~33%, from 11 seconds to 7 seconds. Closes #107 Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Reviewed by: Ned Bass <bass6@llnl.gov> Reviewed by: Jinshan Xiong <jinshan.xiong@intel.com> Author: Matthew Ahrens <mahrens@delphix.com> openzfs/openzfs@5fc46359c569369d87728ca09f8705cdff6cc8e2
* MFC r308437 and r308461:hselasky2016-11-121-2/+16
| | | | | | | | | | | Range check the jitter values to avoid bogus sample rate adjustments. The expected deviation should not be more than 1Hz per second. The USB v2.0 specification also mandates this requirement. Refer to chapter 5.12.4.2 about feedback. Allow higher sample rates to have more jitter than lower ones. PR: 208791
* MFC r308025:kib2016-11-112-3/+9
| | | | Enable vn_io_fault() deadlock avoidance for msdosfs.
* MFC r308024:kib2016-11-111-4/+26
| | | | | Ensure that cluster allocations never allocate clusters outside the volume limits.
* MFC r308023:kib2016-11-111-1/+4
| | | | | If the fatchain() call in chainalloc() returned an error, revert marking the cluster run as in-use.
OpenPOWER on IntegriCloud