aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Notes: svn path=/head/; revision=368124
* Add the firmware blob required to use the sdma hardware in the imx6Ian Lepore2020-11-262-0/+147
| | | | | | | | | | | | processor, and its associated license text (which is similar to a bsd-3-clause, but with a prohibition against decompiling). Install a copy of the license in /usr/share/doc/legal/imx, to comply with the license terms that requires a copy of the license to be delivered along with the firmware. Obtained from: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/imx/sdma/sdma-imx6q.bin https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.sdma_firmware Notes: svn path=/head/; revision=368042
* Adjust ENA driver files to latest ena-com changesMarcin Wojtas2020-11-1810-344/+503
| | | | | | | | | | | | | | | | | * Use the new API of ena_trace_* * Fix typo syndrom --> syndrome * Remove validation of the Rx req ID (already performed in the ena-com) * Remove usage of deprecated ENA_ASSERT macro Submitted by: Ido Segev <idose@amazon.com> Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf Sponsored by: Amazon, Inc MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27115 Notes: svn path=/head/; revision=367799
* Fix completion descriptors alignment for the ENAMarcin Wojtas2020-11-183-17/+33
| | | | | | | | | | | | | | | | | | | | The latest generation hardware requires IO CQ (completion queue) descriptors memory to be aligned to a 4K. It needs that feature for the best performance. Allocating unaligned descriptors will have a big performance impact as the packet processing in a HW won't be optimized properly. For that purpose adjust ena_dma_alloc() to support it. It's a critical fix, especially for the arm64 EC2 instances. Submitted by: Ido Segev <idose@amazon.com> Obtained from: Amazon, Inc MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27114 Notes: svn path=/head/; revision=367795
* Restore identification of VDEVs using non-native block size.Cy Schubert2020-11-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | NAME STATE READ WRITE CKSUM dsk02 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada1s4a ONLINE 0 0 0 ada2s4a ONLINE 0 0 0 block size: 512B configured, 4096B native Reviewed by: tsoome (previous FreeBSD phab version) Differential Revision: https://reviews.freebsd.org/D26880 Upstream commit: 3928ec53395fcc26be7844dd6b63df757166c281 Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Reviewed-by: Toomas Soome <tsoome@me.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed off by: Cy Schubert <cy@FreeBSD.org> Closes #11088 Notes: svn path=/head/; revision=367779
* vchiq: Rename timer func so they do not conflict with linuxkpiEmmanuel Vadot2020-11-173-19/+19
| | | | Notes: svn path=/head/; revision=367764
* zfs: disable periodic arc updatesMateusz Guzik2020-11-141-0/+2
| | | | | | | | | They are only there to provide less innacurate statistics for debuggers. However, this is quite heavy-weight and instead it would be better to teach debuggers how to obtain the necessary information. Notes: svn path=/head/; revision=367696
* MFV: r367652Jung-uk Kim2020-11-1319-99/+311
|\ | | | | | | | | | | | | Merge ACPICA 20201113. Notes: svn path=/head/; revision=367654
* | zfs: combine zio caches if possibleMateusz Guzik2020-11-101-24/+55
| | | | | | | | | | | | | | | | | | | | This deduplicates 2 sets of caches using the same sizes. Memory savings fluctuate a lot, one sample result is buildworld on zfs saving ~180MB RAM in reduced page count associated with zio caches. Notes: svn path=/head/; revision=367569
* | zfs: g/c unused data_alloc_arenaMateusz Guzik2020-11-101-3/+1
| | | | | | | | Notes: svn path=/head/; revision=367568
* | Check if the ZVOL has been written before calling zil_async_to_sync.Mariusz Zaborski2020-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The ZIL will be opened on the first write, not earlier. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Mariusz Zaborski <oshogbo@vexillium.org> OpenZFS Pull Request: https://github.com/openzfs/zfs/pull/11152 PR: 250934 Notes: svn path=/head/; revision=367487
* | zfs: remove 2 assertions that teardown lock is not heldMateusz Guzik2020-11-071-45/+0
| | | | | | | | | | | | | | | | | | They are not very useful and hard to implement with rms. This has a side effect of simplying the code. Notes: svn path=/head/; revision=367454
* | Add firmware modules for qat(4), take twoMark Johnston2020-11-0610-0/+0
| | | | | | | | | | | | | | | | | | | | | | My script to convert git commits to svn patch does not handle binary files correctly, and r367387 committed a set of empty files as a result. MFC with: r367387 Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=367422
* | Add firmware modules for qat(4)Mark Johnston2020-11-0511-0/+11
| | | | | | | | | | | | | | | | MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=367387
* | zfs: lz4: add optional kmem_alloc supportMateusz Guzik2020-11-051-4/+57
| | | | | | | | | | | | | | | | | | lz4 port from illumos to Linux added a 16KB per-CPU cache to accommodate for the missing 16KB malloc. FreeBSD supports this size, making the extra cache harmful as it can't share buckets. Notes: svn path=/head/; revision=367360
* | zfs: use rms lock for teardown handlingMateusz Guzik2020-11-041-0/+43
| | | | | | | | | | | | | | | | | | | | This deserializes otherwise non-contending operations. The previous scheme of using 17 locks hashed by curthread runs into conflicts very quickly. Notes: svn path=/head/; revision=367346
* | zfs: macroify teardown handlingMateusz Guzik2020-11-048-44/+77
| | | | | | | | Notes: svn path=/head/; revision=367345
* | zfs: rename teardown inactive macros to mimick rrm conventionMateusz Guzik2020-11-044-34/+34
| | | | | | | | Notes: svn path=/head/; revision=367344
* | zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macrosMateusz Guzik2020-11-042-4/+4
| | | | | | | | | | | | | | They are expected to fail only in corner cases. Notes: svn path=/head/; revision=367343
* | zfs: even up assertMateusz Guzik2020-11-041-1/+2
| | | | | | | | Notes: svn path=/head/; revision=367342
* | zfs: zstd: short-circuit cleaning buffers if none existMateusz Guzik2020-11-021-0/+7
| | | | | | | | | | | | | | This avoids a barrage of locking every minute. Notes: svn path=/head/; revision=367276
* | Fix 32-bit build after r367229.Brandon Bergren2020-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of atomic_sub_64() in zfs_zstd.c was breaking the 32-bit build on platforms without native 64-bit atomics due to atomic_sub_64() not being available, and no fallback being provided in _STANDALONE. Provide a standalone stub to match atomic_add_64() using simple math. While this is not actually atomic, it does not matter in libsa context, since it always runs single-threaded and does not run under a scheduler. Reviewed by: mjg (in email) Notes: svn path=/head/; revision=367235
* | zfs: zstd: track allocator statisticsMateusz Guzik2020-10-312-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies: commit c4ede65bdfca11b532403620bbf0d6e33f0c1c1d Author: Mateusz Guzik <mjguzik@gmail.com> Date: Fri Oct 30 23:26:10 2020 +0100 zstd: track allocator statistics Note that this only tracks sizes as requested by the caller. Actual allocated space will almost always be bigger (e.g., rounded up to the next power of 2 or page size). Additionally the allocated buffer may be holding other areas hostage. Nonetheless, this is a starting point for tracking memory usage in zstd. from openzfs Notes: svn path=/head/; revision=367229
* | cache: add cache_vop_mkdir and rename cache_rename to cache_vop_renameMateusz Guzik2020-10-301-3/+13
| | | | | | | | Notes: svn path=/head/; revision=367162
* | Drop "All rights reserved" from all my stuff. This includesEdward Tomasz Napierala2020-10-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Foundation copyrights, approved by emaste@. It does not include files which carry other people's copyrights; if you're one of those people, feel free to make similar change. Reviewed by: emaste, imp, gbe (manpages) Differential Revision: https://reviews.freebsd.org/D26980 Notes: svn path=/head/; revision=367105
* | zfs: remove unused support for zfs_znode_moveMateusz Guzik2020-10-262-31/+1
| | | | | | | | Notes: svn path=/head/; revision=367054
* | Skip RAW kstat sysctls by defaultRyan Moeller2020-10-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hese kstats are often expensive to compute so we want to avoid them unless specifically requested. The following kstats are affected by this change: kstat.zfs.${pool}.multihost kstat.zfs.${pool}.misc.state kstat.zfs.${pool}.txgs kstat.zfs.misc.fletcher_4_bench kstat.zfs.misc.vdev_raidz_bench kstat.zfs.misc.dbufs kstat.zfs.misc.dbgmsg PR: 249258 Reported by: mjg Reviewed by: mjg, allanjude Obtained from: https://github.com/openzfs/zfs/pull/11099 Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=367010
* | vfs: drop spurious cache_purge on rmdirMateusz Guzik2020-10-231-2/+0
| | | | | | | | | | | | | | | | | | | | The removed directory gets cache_purged which is sufficient to remove any entries related to the parent. Note only tmpfs, ufs and zfs are patched. Notes: svn path=/head/; revision=366975
* | vfs: drop the de facto curthread argument from VOP_INACTIVEMateusz Guzik2020-10-201-2/+1
| | | | | | | | Notes: svn path=/head/; revision=366870
* | vfs: drop spurious cred argument from VOP_VPTOCNPMateusz Guzik2020-10-201-2/+1
| | | | | | | | Notes: svn path=/head/; revision=366869
* | Update OpenZFS to 2.0.0-rc3-gfc5966Matt Macy2020-10-17198-515/+748
| | | | | | | | | | | | | | | | | | | | | | - fix panic due to tqid overflow - Improve libzfs_error_init messages - Expose zfetch_max_idistance tunable - Make dbufstat work on FreeBSD - Fix EIO after resuming receive of new dataset over an existing one Notes: svn path=/head/; revision=366780
* | zfs: g/c unused vop_vector zfsctl_ops_shares_dirMateusz Guzik2020-10-151-3/+1
| | | | | | | | Notes: svn path=/head/; revision=366718
* | zfs: add missing fplookup vopsMateusz Guzik2020-10-152-0/+4
| | | | | | | | | | | | | | | | | | | | Some vnodes come with a hack which inherits the fplookup flag despite having vops which don't provide the routine. Reported by: YAMAMOTO Shigeru <shigeru@os-hackers.jp> Notes: svn path=/head/; revision=366717
* | FreeBSD: fix panic due to tqid overflowMateusz Guzik2020-10-131-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 32-bit counter eventually wraps to 0 which is a sentinel for invalid id. Make it 64-bit on LP64 platforms and 0-check otherwise. Note: Linux counterpart uses id stored per queue instead of a global. I did not check going that way is feasible with the goal being the minimal fix doing the job. Reported by: YAMAMOTO Shigeru <shigeru@os-hackers.jp> Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D26759 Notes: svn path=/head/; revision=366685
* | Add zstd support to the boot loader.Warner Losh2020-10-1220-34/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to the _STANDALONE environment enough bits of the kernel that we can compile it. We still have a small zstd_shim.c since there were 3 items that were a bit hard to nail down and may be cleaned up in the future. These go hand in hand with a number of commits to sys/sys in the past weeks, should this need be MFCd. Discussed with: mmacy (in review and on IRC/Slack) Reviewed by: freqlabs (on openzfs repo) Differential Revision: https://reviews.freebsd.org/D26218 Notes: svn path=/head/; revision=366657
* | zfs: use cache_renameMateusz Guzik2020-10-101-4/+1
| | | | | | | | Notes: svn path=/head/; revision=366598
* | MFV: r366539Jung-uk Kim2020-10-0933-108/+516
|\| | | | | | | | | | | | | Merge ACPICA 20200925. Notes: svn path=/head/; revision=366562
* | Explicit CTLFLAG_DYN not neededRyan Moeller2020-10-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Dynamically created OIDs automatically get this flag set. Reviewed by: jhb MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26561 Notes: svn path=/head/; revision=366433
* | OpenZFS: don't call fpu_kern_thread on i386Matt Macy2020-10-021-1/+1
| | | | | | | | Notes: svn path=/head/; revision=366353
* | OpenZFS: MFV 2.0-rc3-gfc5966Matt Macy2020-10-0153-495/+1340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Annotate FreeBSD sysctls with CTLFLAG_MPSAFE - Reduce stack usage of Lua - Don't save user FPU context in kernel threads - Add support for procfs_list - Code cleanup in zio_crypt - Add DB_RF_NOPREFETCH to dbuf_read()s in dnode.c - Drop references when skipping dmu_send due to EXDEV - Eliminate gratuitous bzeroing in dbuf_stats_hash_table_data - Fix legacy compat for platform IOCs Notes: svn path=/head/; revision=366350
* | Continued ipfilter #ifdef cleanup. The r343701 log entry contains aCy Schubert2020-09-301-4/+3
| | | | | | | | | | | | | | | | | | complete description. MFC after: 1 week Notes: svn path=/head/; revision=366287
* | ZFS: Fix a logic bug in the FreeBSD getpages VOPMark Johnston2020-09-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | This was introduced when I merged r361287 to OpenZFS and has been fixed there already, commit 3f6bb6e43fd68e. Reported by: swills Reviewed by: allanjude, freqlabs, mmacy Notes: svn path=/head/; revision=366252
* | Remove extraneous bracket.Cy Schubert2020-09-271-1/+1
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=366204
* | cache: drop the force flag from purgevfsMateusz Guzik2020-09-231-1/+1
| | | | | | | | | | | | | | | | | | The optional scan is wasteful, thus it is removed altogether from unmount. Callers which always want it anyway remain unaffected. Notes: svn path=/head/; revision=366071
* | vchi: rename bitset macros to avoid collision with bitset(9)D Scott Phillips2020-09-212-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upcoming change to include bitset(9) macros from vm_page.h causes a macro name collision with vchi's custom bitset macros. This change was performed mechanically by: sed -i .orig s/BITSET/VCHI_BITSET/g $(grep -rl BITSET sys/contrib/vchiq) Reviewed by: andrew Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26177 Notes: svn path=/head/; revision=365974
* | MFV 2.0-rc2Matt Macy2020-09-18134-524/+2671
| | | | | | | | | | | | | | | | - Fixes divide by zero for unusual hz - remove cryptodev dependency Notes: svn path=/head/; revision=365894
* | ys/contrib/dev/ath: remove unintentional double semicolonEd Maste2020-09-181-1/+1
| | | | | | | | | | | | | | Approved by: adrian Notes: svn path=/head/; revision=365888
* | Do not copy vp into f_data for DTYPE_VNODE files.Konstantin Belousov2020-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer to vnode is already stored into f_vnode, so f_data can be reused. Fix all found users of f_data for DTYPE_VNODE. Provide finit_vnode() helper to initialize file of DTYPE_VNODE type. Reviewed by: markj (previous version) Discussed with: freqlabs (openzfs chunk) Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26346 Notes: svn path=/head/; revision=365783
* | ice_ddp: Fix 1.3.16.0 packageEric Joyner2020-09-101-0/+0
| | | | | | | | | | | | | | | | | | | | | | The version uploaded in the previous commit was far too small. This one should be the right size. MFC after: 1 day Sponsored by: Intel Corporation Notes: svn path=/head/; revision=365550
* | ZFS: MFV 2.0-rc1-gfd20a8Matt Macy2020-09-0455-578/+711
| | | | | | | | | | | | | | | | | | | | - fixes jail delegation - fixes raw kstat unsupported complaints - exposes dbgmsg, dbuf, and checksum benchmark stats - restore rename -u support Notes: svn path=/head/; revision=365347