DDT: Switch to using ZAP _by_dnode() interfaces
As was previously done for BRT, avoid holding/releasing DDT ZAP
dnodes for every access. Instead hold the dnodes during all their
life time, never releasing.
While at this, add _by_dnode() interfaces for zap_length_uint64()
and zap_count(), actively used by DDT code.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18047
remove sys/dts/arm/socfpga_*_sdmmc.dts
These two files are broken due to Linux 6.5 DTS import.
Both of these boards have support in Linux DTS tree,
please use these DTS instead.
Removed and not fixed because of commit 949efdaa1db8
Approved by: br, manu (mentor)
Differential revision: https://reviews.freebsd.org/D54216
[Github] Remove use of deprecated login_or_token (#172240)
This function was deprecated recently. Update to the auth parameter to
get ahead of the deprecation.
py-dnslib: Import py-dnslib-0.9.26
A library to encode/decode DNS wire-format packets supporting both
Python 2.7 and Python 3.2+.
The library provides:
* Support for encoding/decoding DNS packets between wire format,
python objects, and Zone/DiG textual representation (dnslib.dns)
* A server framework allowing the simple creation of custom DNS
resolvers (dnslib.server) and a number of example servers
created using this framework
* A number of utilities for testing (dnslib.client, dnslib.proxy,
dnslib.intercept)
Upgrade: remove quick from old match rules
Filter match rules previously continued evaluation regardless of "quick"
being set. Remove "quick" from existing rules on upgrade to retain the
expected behavior of continuing evaluation for match rules.
vfs_cache: Fix the SDT definition of vfs:fplookup:lookup:done
1. The definition lists struct nameidata as the type of the first
argument. However, the actual probes always pass a variable of type
struct nameidata* to SDT_PROBE3.
2. The third argument (args[2]) is actually enum cache_fpl_status.
Reviewed by: markj
Approved by: markj (mentor)
Fixes: 07d2145a1717 vfs: add the infrastructure for lockless lookup
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51315
(cherry picked from commit 6567623f831daaffa67777d17780e8f424c1bb01)
vfs_cache: Fix the SDT definition of vfs:fplookup:lookup:done
1. The definition lists struct nameidata as the type of the first
argument. However, the actual probes always pass a variable of type
struct nameidata* to SDT_PROBE3.
2. The third argument (args[2]) is actually enum cache_fpl_status.
Reviewed by: markj
Approved by: markj (mentor)
Fixes: 07d2145a1717 vfs: add the infrastructure for lockless lookup
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51315
(cherry picked from commit 6567623f831daaffa67777d17780e8f424c1bb01)
DDT: Move logs searches out of the lock
Postponing entry removal from the DDT log in case of hit till later
single-threaded sync stage allows to make ddl_tree stable during
multi-threaded ZIO processing stage. It allows to drop the DDT lock
before the search instead of after, reducing the contention a lot.
Actually ddt_log_update_entry() was already handling the case of
entry present in the active log, so we only need to remove it from
flushing log, if the entry happen to be there.
My tests with parallel 4KB block writes show throughput increase
from 480MB/s (122K blocks/s) to 827MB/s (212K blocks/s), even
though still limited by the global DDT lock contention.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18044
new committer (src): John Hall (jrhall)
Complete steps 1-4 for new committers from the committer's guide:
1. Add myself to doc/shared/authors.adoc
2. Add myself to doc/shared/contrib-committers.adoc
3. Add a news entry
4. Add my PGP key
Reviewed By: imp (mentor)
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D53933
lacp: Sort port map by interface index
This makes it easier to reason about system topology, and to
potentially map applications to NIC queues by (ab)using the
mbuf flowid to select egress NIC and queue in a predictable fashion.
Differential Revision: https://reviews.freebsd.org/D54053
Reviewed by: glebius, kbowling
Sponsored by: Netflix
[AMDGPU] LiveRegOptimizer: consider i8/i16 binops on SDWA (#155800)
PHI-node part was merged with PR#160909.
Extend `isOpLegal` to treat 8/16-bit vector add/sub/and/or/xor as
profitable on SDWA targets (stores and intrinsics remain profitable).
This repacks loop-carried values to i32 across BBs and restores SDWA
lowering instead of scattered lshr/lshl/or sequences.
Testing:
- Local: `check-llvm-codegen-amdgpu` is green (4314/4320 passed, 6
XFAIL).
- Additional: validated in AMD internal CI
cross-build: fix after the recent sqlite3 import
Stop adding contrib/sqlite3 into the include path for usr.bin/kyua, take
headers from the install sysroot env. sqilte3 now has the VERSION file,
which clashes with c++ include <version>.
Submitted by: jrtc27 (see https://reviews.freebsd.org/D51217)
Tested by: kib
Fixes: 17f0f75308f2 ("sqlite3: Vendor import of sqlite3 3.50.2")
(cherry picked from commit 09d28419c646650a77721e168ef43bc1bac96b67)
freebsd-update: Mention upgrading packages, not just ports
These days most end users are likely using pre-built packages, not
locally-built ports. Thus be sure to mention this as an important case,
and put it ahead of ports.
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42968
(cherry picked from commit ced74610217ff0be071e4614c64a4ff66c40bc6b)
rtld-elf/riscv: Don't allocate static TLS for dynamic TLS relocations
Provided you don't run out of extra static TLS space this should work,
but it's wholly unnecessary and not how things are supposed to be done.
Only static TLS relocations should allocate static TLS.
Reviewed by: kib
Fixes: 4b1859c0e943 ("Add support for RISC-V architecture.")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50563
(cherry picked from commit 03801d449a3731cb643a51625c8c4d5d07b2e54c)
bsd.compat.mk: Honour XSTRIPBIN for lib32
Currently we only honour XNM and XOBJCOPY, but XSTRIPBIN is important
during install. Otherwise we end up using STRIPBIN for the host, not the
target, which is normally the same, but may not be, especially on
non-FreeBSD systems. In particular, cheribuild will build FreeBSD with
STRIPBIN=/usr/bin/strip XSTRIPBIN=strip (with the latter referring to
the bootstrap strip in PATH), which breaks for WITH_LIB32 when the
host's /usr/bin/strip is unable to process the lib32 binaries (e.g.
building arm64 FreeBSD's lib32 on an amd64 GNU/Linux system).
MFC after: 1 week
(cherry picked from commit ad13dc1ece2fe4a6192bceffea4a868ba6a2e0e2)
share: Delete bitrotted make_*_driver.sh scripts
These scripts have not seen the necessary changes to keep them up to
date with current KPIs and coding practices. They use I/O ports directly
rather than any bus abstractions, use i386 (which is on the way out for
kernel configs) as the architecture of choice for generated kernel
configs, use ISA KPIs, use INTR_TYPE_FAST (renamed in 2000 to INTR_FAST
and removed in 2011), and likely have other issues too that render them
more harm than good for the uninitiated developer looking for a driver
template. If anyone wants to invest time in modernising them they can do
so and bring them back, but for now delete them.
Reviewed by: cperciva, imp, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50468
(cherry picked from commit 8f0a6a9aadb1fe4ce87345c6d2fbb2d2b6f6cedf)
cross-build: Workaround system-provided strchrnul on macOS 15.4+
macOS added a native strchrnul in 15.4. There is not an easy way to
detect it at compile time, so use a macro to rename our local inline
version to avoid conflicts while also forcing its use during
bootstrap. The local version can be removed once macOS versions older
than 15.4 are no longer supported as build hosts.
Co-authored by: jrtc27
Reported by: kib
Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D49893
(cherry picked from commit 4e2616b74cb7eed921aa10fb776cdc2d5fd4e42f)
imgact_elf: Fix off-by-one in note size check
Prior to c86af2cc4cd1 ("imgact_elf: Check note body sizes"), this was
note_name + n_namesz >= note_end, which checks that there is at least
one byte after the unpadded name (which could be either padding or
data), and given our notes always have data with them this was fine.
However, once we started checking the padded name (note that "FreeBSD\0"
is already a multiple of 4 bytes, so has no padding) and data, this
turned into checking that there is at least one byte after the unpadded
data, and since our ELF notes already have a multiple of 4 bytes for
their data and therefore have no padding, this means that we are now
checking that there is at least one byte after the ELF note, which is
not going to be the case for the last ELF note. Instead, switch this to
a strict greater than, as should be used when comparing one-past-the-end
pointers, which both sides of the inequality are.
For executables, this was generally not a problem in reality, since the
last of our ELF notes is NT_FREEBSD_NOINIT_TAG, which isn't read by the
kernel. However, ld-elf.so.1 (and libcompat variants), like shared
[15 lines not shown]
libc/riscv: Fix initial exec TLS mode for dynamically loaded shared objects
The offset here is relative to the TCB, not whatever the thread pointer
points to, so as with powerpc and powerpc64 we need to account for that.
However, rather than using hard-coded offsets as they did, due to
predating machine/tls.h, we can just re-use _tcb_get().
Note that if libthr is used, and its initialiser has been called, it
will take a different path that uses _get_static_tls_base, which works
just fine on riscv (adding the offset to thr->tcb). This only affects
programs that aren't linked against libthr (or that are but manage to
dlopen before the initialiser is called, if that's even possible).
In future this code should be made MI by just reusing _tcb_get() and
checking the TLS variant (since the offset here is positive even for
variant II, where it should be subtracted), but this is a targeted fix
that makes it clear what's changing.
Reviewed by: kib
[5 lines not shown]