aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Tidy up libzpool MakefileRyan Moeller2020-08-261-21/+20
| | | | | | | Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364829
* Back out r364791 to unbreak jails. Lesson learned: "compile and test" meansJamie Gritton2020-08-261-2/+1
| | | | | | | | | | running the test on the same executable that you just compiled. PR: 248444 Pointy hat to: jamie Notes: svn path=/head/; revision=364828
* libsa: only skein_block.c is using SKEIN_LOOPToomas Soome2020-08-261-2/+2
| | | | | | | Only use SKEIN_LOOP while compiling skein_block.c Notes: svn path=/head/; revision=364827
* Make sbuf_setpos match the implementation.Warner Losh2020-08-261-4/+3
| | | | | | | | | | | sbuf_setpos can only be used to truncate the buffer, never to make it longer. Update the documentation to reflect this. Reviewed By: allanjude, phk Differential Revision: https://reviews.freebsd.org/D26198 Notes: svn path=/head/; revision=364824
* Regen X86 assembly files after r364822.Jung-uk Kim2020-08-2622-86/+44039
| | | | Notes: svn path=/head/; revision=364823
* Fix Clang version detection.Jung-uk Kim2020-08-2622-22/+22
| | | | | | | | | | We prepend "FreeBSD" to Clang version string. This broke compiler test for AVX instruction support. Reported by: jhb Notes: svn path=/head/; revision=364822
* Install zfs-events.5Ryan Moeller2020-08-261-0/+1
| | | | | | | Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364821
* Use a large kmem arena import size on NUMA systems.Mark Johnston2020-08-261-2/+16
| | | | | | | | | | | | | | | This helps minimize internal fragmentation that occurs when 2MB imports are interleaved across NUMA domains. Virtually all KVA allocations on direct map platforms consume more than one page, so the fragmentation manifests as runs of 511 4KB page mappings in the kernel. Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26050 Notes: svn path=/head/; revision=364820
* vmem: Avoid allocating span tags when segments are never released.Mark Johnston2020-08-261-13/+50
| | | | | | | | | | | | | | | | | | | | | | | | vmem uses span tags to delimit imported segments, so that they can be released if the segment becomes free in the future. However, the per-domain kernel KVA arenas never release resources, so the span tags between imported ranges are unused when the ranges are contiguous. Furthermore, such span tags prevent coalescing of free segments across KVA_QUANTUM boundaries, resulting in internal fragmentation which inhibits superpage promotion in the kernel map. Stop allocating span tags in arenas that never release resources. This saves a small amount of memory and allows free segements to coalesce across import boundaries. This manifests as improved kernel superpage usage during poudriere runs, which also helps to reduce physical memory fragmentation by reducing the number of broken partially populated reservations. Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24548 Notes: svn path=/head/; revision=364819
* efibootmgr: wrong check for opts.orderToomas Soome2020-08-261-1/+1
| | | | | | | | | opts.order && !(opts.order) does not really make sense. Reported by: swildner Notes: svn path=/head/; revision=364818
* As of r364746 (OpenZFS import) existing ZPOOLs are not importedCy Schubert2020-08-265-9/+34
| | | | | | | | | | | | | | | | | | prior to zvol and mountcritlocal resulting in ZVOLs (swap and virtual machine UFS filesystems) being unavailable, leading to boot failures. We move the zpool import from zfs to a new zpool script, with the -N option to avoid mounting datasets while making the ZPOOL's datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs available for subsequent use for swap (in the zvol rc sript) or for UFS or other filesystems in fstab(5), mounted by mountcritlocal. Reviewed by: freqlabs (previous version) Differential Revision: https://reviews.freebsd.org/D26185 Notes: svn path=/head/; revision=364817
* cache: relock on failure in cache_zap_locked_vnodeMateusz Guzik2020-08-261-5/+9
| | | | | | | | This gets rid of bogus scheme of yielding in hopes the blocking thread will make progress. Notes: svn path=/head/; revision=364816
* cache: stop null checking in cache_freeMateusz Guzik2020-08-261-5/+7
| | | | Notes: svn path=/head/; revision=364815
* cache: make it mandatory to request both timestamps or neitherMateusz Guzik2020-08-261-5/+5
| | | | Notes: svn path=/head/; revision=364814
* cache: convert bucketlocks to a mutexMateusz Guzik2020-08-262-101/+77
| | | | | | | | By now bucket locks are almost never taken for anything but writing and converting to mutex simplifies the code. Notes: svn path=/head/; revision=364813
* cache: only evict negative entries on CREATE when ISLASTCN is setMateusz Guzik2020-08-261-23/+27
| | | | Notes: svn path=/head/; revision=364812
* cache: decouple smr and locked lookup in the slowpathMateusz Guzik2020-08-261-66/+118
| | | | | | | Tested by: pho Notes: svn path=/head/; revision=364811
* cache: factor dotdot lookup out of cache_lookupMateusz Guzik2020-08-261-79/+127
| | | | | | | Tested by: pho Notes: svn path=/head/; revision=364810
* Avoid recomputing COMPILER_/LINKER_ variables when set explicitlyAlex Richardson2020-08-262-4/+10
| | | | | | | | | | | | | | | | | | I noticed that when we build libraries for a different ABI (in CheriBSD) we were calling ${XCC}/${LD} --version for every directory. It turns out that this was caused by bsd.compat.mk explicitly setting (X_)COMPILER variables for that build stage and this stops the _can_export logic from working. To fix this, we change the check to only set _can_export=no if the variable is set and it is set to a different value than the cached value. This noticeably speeds up the tree walk while building compat libraries. During an upstream amd64 buildworld this also removes 8 --version calls. Obtained from: CheriBSD Reviewed By: brooks, emaste Differential Revision: https://reviews.freebsd.org/D25986 Notes: svn path=/head/; revision=364809
* Move libsqlite3 to the top of the SUBDIR listAlex Richardson2020-08-261-1/+3
| | | | | | | | | | | | | | In parallel builds, this should allow sqlite to start building earlier and increase parallelism when building lib/. Looking at htop output during buildworld/tinderbox, there are long phases where only one CPU is active optimizing the massive sqlite3.c file since the build of libsqlite3 is started quite late. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D26169 Notes: svn path=/head/; revision=364808
* Fix builds that set LD=ld.lld after r364761Alex Richardson2020-08-262-2/+4
| | | | | | | | | When using relative paths for the linker we have to transform the name since clang does not like -fuse-ld=ld.lld and instead requires -fuse-ld=lld (the same also applies for ld.bfd). Notes: svn path=/head/; revision=364807
* remove pragma ident linesToomas Soome2020-08-267-14/+0
| | | | | | | | | The #pragma ident is historical relict and not needed any more, this pragma is actually unknown for common compilers and is only causing trouble. Notes: svn path=/head/; revision=364806
* remove left over empty directoryToomas Soome2020-08-260-0/+0
| | | | | | | 364746 did leave empty directory around. Notes: svn path=/head/; revision=364805
* Apply a big hammer for stale pre-OpenZFS filesEd Maste2020-08-261-0/+8
| | | | | | | | | | | | | -DNO_CLEAN builds have had trouble across the OpenZFS import. It's not worth the effort to try to address this with any granularity; instead, just trigger on a .depend file indicating a tree from before the import, and remove the whole cddl object tree. Reviewed by: mmacy, kevans Differential Revision: https://reviews.freebsd.org/D26189 Notes: svn path=/head/; revision=364802
* depend-cleanup.sh: add a note about removing old entriesEd Maste2020-08-261-0/+5
| | | | Notes: svn path=/head/; revision=364801
* geli: use unmapped I/OAlan Somers2020-08-262-8/+68
| | | | | | | | | | | | | | | | | | | | Use unmapped I/O for geli. Unlike most geom providers, geli needs to manipulate data on every read or write. Previously it would always map bios. On my 16-core, dual socket server using geli atop md(4) devices, with 512B sectors, this change increases geli IOPs by about 3x. Note that geli still can't use unmapped I/O when data integrity verification is enabled (but it could, with a little more work). And it can't use unmapped I/O in combination with ZFS, because ZFS uses mapped bios. Reviewed by: markj, kib, jhb, mjg, mat, bcr (manpages) MFC after: 1 week Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25671 Notes: svn path=/head/; revision=364800
* crypto(9): add CRYPTO_BUF_VMPAGEAlan Somers2020-08-2610-13/+338
| | | | | | | | | | | | | | | crypto(9) functions can now be used on buffers composed of an array of vm_page_t structures, such as those stored in an unmapped struct bio. It requires the running to kernel to support the direct memory map, so not all architectures can use it. Reviewed by: markj, kib, jhb, mjg, mat, bcr (manpages) MFC after: 1 week Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25671 Notes: svn path=/head/; revision=364799
* arm64: Increase dmap size to 95 TiBD Scott Phillips2020-08-261-2/+2
| | | | | | | | | | | | | | | The Ampere Altra has physical memory populated sparsely within the physical address space. Increase the size of the dmap to cover all physical memory. Reviewed by: andrew Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26134 Notes: svn path=/head/; revision=364798
* arm64/acpi: Give the real PA limit to ACPID Scott Phillips2020-08-262-1/+43
| | | | | | | | | | | | | Read PA bits from ID_AA64MMFR0_EL1.PARange. Reviewed by: andrew, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26133 Notes: svn path=/head/; revision=364797
* bitset: add BIT_FFS_AT() for finding the first bit set greater than a start bitD Scott Phillips2020-08-262-6/+33
| | | | | | | | | | | Reviewed by: kib Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26128 Notes: svn path=/head/; revision=364796
* efibootmgr: Add option to request booting to the firmware user interfaceD Scott Phillips2020-08-262-2/+89
| | | | | | | | | | | | | | | The OsIndications UEFI variable can request the firware to stop at its UI instead of continuing with boot. Add flags for setting and clearing this request. Reviewed by: manu, bcr (manpages) Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D25839 Notes: svn path=/head/; revision=364795
* arm64: Make local stores observable before sending IPIsD Scott Phillips2020-08-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | Add a synchronizing instruction to flush and wait until the local CPU's writes are observable to other CPUs before sending IPIs. This fixes an issue where recipient CPUs doing a rendezvous could enter the rendezvous handling code before the initiator's writes to the smp_rv_* variables were visible. This manifested as a system hang, where a single CPU's increment of smp_rv_waiters[0] actually happened "before" the initiator's zeroing of that field, so all CPUs were stuck with the field appearing to be at ncpus - 1. Reviewed by: andrew, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D25798 Notes: svn path=/head/; revision=364794
* Handle jail.conf variables that have the same names as parameters.Jamie Gritton2020-08-261-1/+2
| | | | | | | | | PR: 248444 Submitted by: Akos Somfai Reported by: Markus Stoff Notes: svn path=/head/; revision=364791
* date.1: note possibly surprising behaviour of -j -fEd Maste2020-08-261-1/+4
| | | | | | | | | PR: 248918 MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=364790
* ZFS: band-aid for -DNO_CLEANMatt Macy2020-08-251-1/+3
| | | | | | | | | Submitted by: Neal Chauhan Approved by: imp@ Differential Revision: https://reviews.freebsd.org/D26183 Notes: svn path=/head/; revision=364788
* ZFS: whitelist zstd and encryption in the loaderMatt Macy2020-08-251-0/+2
| | | | | | | | | | Please note that neither zstd nor encryption is supported by the loader at this instant. This change makes it safe to use those features in one's root pool, but not in one's root dataset. Notes: svn path=/head/; revision=364787
* vm_pageout: Scale worker threads with CPUsConrad Meyer2020-08-251-32/+31
| | | | | | | | | | | | | | | | | | | | | Autoscale vm_pageout worker threads from r364129 with CPU count. The default is arbitrarily chosen to be 16 CPUs per worker thread, but can be adjusted with the vm.pageout_cpus_per_thread tunable. There will never be less than 1 thread per populated NUMA domain, and the previous arbitrary upper limit (at most ncpus/2 threads per NUMA domain) is preserved. Care is taken to gracefully handle asymmetric NUMA nodes, such as empty node systems (e.g., AMD 2990WX) and systems with nodes of varying size (e.g., some larger >20 core Intel Haswell/Broadwell Xeon). Reviewed by: kib, markj Sponsored by: Isilon Differential Revision: https://reviews.freebsd.org/D26152 Notes: svn path=/head/; revision=364786
* bsdinstall: Update loader.conf for new OpenZFS depsRyan Moeller2020-08-251-3/+3
| | | | | | | | | | zfs.ko now includes the SPL but relies on cryptodev instead. Reported by: D Scott Phillips Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364785
* After r364423, which ensures the callbacks that dl_iterate_phdr(3)Dimitry Andric2020-08-251-1/+4
| | | | | | | | | | | | | | | | | | performs are protected by an exclusive lock, even for statically linked programs, it is safe to re-enable libunwind's FrameHeaderCache, which I temporarily disabled in r364263. Meanwhile upstream has also used the _LIBUNWIND_USE_FRAME_HEADER_CACHE for this purpose, so the only thing needed is to add this as a compile-time command line flag. While here, reformat the CFLAGS lines a little bit. MFC after: 6 weeks X-MFC-With: r364284, r364423 Notes: svn path=/head/; revision=364784
* Skip zpool_clear_005_pos test until bug fixedRyan Moeller2020-08-251-0/+1
| | | | | | | | | | | | | | Messing with gnop devices under a zpool fails in this test, causing the pool to be suspended and eventually the system to deadlock. Skip the test for now until the issue is resolved. PR: tests/248910 Discussed with: lwhsu Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364783
* After r364753, there should be no need to suppress -Watomic-alignmentDimitry Andric2020-08-251-6/+0
| | | | | | | | | | | | | warnings anymore for compiler-rt's atomic.c. This occurred because the IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this caused the compiler to emit a runtime call to __atomic_is_lock_free(), and that triggers the warning. MFC after: 2 weeks X-MFC-With: r364753 Notes: svn path=/head/; revision=364782
* [PowerPC] More preemptive powerpcspe ZFS build fixesBrandon Bergren2020-08-252-3/+3
| | | | | | | | | | | | | I went through the merge and found the rest of the instances where ${MACHINE_ARCH} == "powerpc" was being used to detect 32-bit and adjusted the rest of the instances to also check for powerpcspe. mips32* will probably want to do the same. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=364781
* [PowerPC] Apply the ppc32 GOT overflow fix to powerpcspeBrandon Bergren2020-08-251-1/+1
| | | | | | | | | | powerpcspe is also a 32 bit ppc platform, and also needs to be -fPIC to avoid overflowing the GOT. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=364780
* sdhci(4): Recognize the Texas Instruments PCIxx12 card reader.Mark Johnston2020-08-252-2/+5
| | | | | | | | | PR: 248650 Submitted by: Lars Herschke <lhersch@dssgmbh.de> MFC after: 1 week Notes: svn path=/head/; revision=364779
* Fix zstd in OpenZFS module with CPUTYPE?=<something with BMI>Ryan Moeller2020-08-251-1/+1
| | | | | | | | | | | | | | | | | | | The build breaks when something adds -march=<something with BMI> to the compiler flags, for example CPUTYPE?=native. When the arch supports BMI, __BMI__ is defined and zstd.c tries to include immintrin.h, which is not present when building the kernel. Disable experimental BMI intrinsics in zstd in the OpenZFS kernel module by explicitly undefining __BMI__ for zstd.c. A similar fix was needed for the original zstd import, done in r327738. Reported by: Jakob Alvermark Discussed with: mmacy Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364777
* libbe: lift the WARNS post-OpenZFS mergeKyle Evans2020-08-251-3/+0
| | | | | | | | | | | | | | | | | sys/ccompile.h no longer uses #pragma ident, so we no longer need to worry about unknown pragmas. I fixed one WARNS issue in r363409 by annotating be_is_auto_snapshot_name's lbh parameter __unused, then upstreamed the following changes to OpenZFS that rode in with the merge: - zfs_path_to_zhandle now takes a const char *path rather than a char *path, since it won't be mutating the string it receives and I had no reason to believe it will need to in the future. [OpenZFS PR #10605] - Annotated some unused parameters on definitions inlined into headers as such. [OpenZFS PR #10606] Notes: svn path=/head/; revision=364775
* Fix userboot after r364355Matt Macy2020-08-251-1/+1
| | | | | | | | r364355 replaced init_zfs_bootenv with init_zfs_boot_options and neglected to update userboot in the process. Notes: svn path=/head/; revision=364773
* Give stronger guidance with regards to upgrading root poolsMatt Macy2020-08-251-3/+4
| | | | Notes: svn path=/head/; revision=364772
* rtsol(d): add script for "M bit"Bjoern A. Zeeb2020-08-255-11/+69
| | | | | | | | | | | | | | | | | While we do support the "O bit" running a script (usually to start a dhcpv6 client) we have no options for setups which set the "M bit" for, e.g., static address assignment as in EC2. Duplicate most of the "O bit" logic to also start a script for the "M bit" with the one difference: if the "M bit" is set we will not start the script for the "O bit" as well (per RFC 4861, Section 4.2). Reviewed by: hrs, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26099 Notes: svn path=/head/; revision=364771
* iflib: netmap: publish all the receive bufferVincenzo Maffione2020-08-251-22/+28
| | | | | | | | | | | | | | | | | At initialization time, the netmap RX refill function used to prepare the NIC RX ring with N-1 buffers rather than N (with N equal to the number of descriptors in the NIC RX ring). This is not how netmap is supposed to work, as it would keep kring->nr_hwcur not in sync with the NIC "next index to refill" (i.e., fl->ifl_pidx). Instead we prepare N buffers, although we still publish (with isc_rxd_flush()) only the first N-1 buffers, to avoid the NIC producer pointer to overrun the NIC consumer pointer (for NICs where this is a real issue, e.g. Intel ones). MFC after: 2 weeks Notes: svn path=/head/; revision=364770