iflib: add a new global tunable "prefer_mpring"
net.iflib.prefer_mpring can be used to control whether or
not all iflib driver instances default to mp_ring or simple_tx.
This is intended to be temporary, to allow easy testing (now) of
simple_tx, and to allow an easy fallback to the legacy path
(later) once the default is switched to simple_tx
Work around smtiic(4) misbehavior to fix RTC setting & reboots
For some reason this i2c chip starts to misbehave after a few
hours/days, and when that happens setting the RTC or halting/rebooting
becomes impossible. Waiting a bit after enabling the device appears to
reliably fix this and alleviates the pain of handling remote machines
such as the riscv64.p ports cluster. There is probably a better fix but
I'm not sure which one exactly.
ok kettenis@
Reduce size of DTLS queues for unprocessed records and application data.
DTLS currently buffers records that contain handshake messages and alerts,
which are in the next epoch and cannot yet be processsed. This is done by
saving the entire buffer that is 16KB in size, regardless of the actual
bytes sent on the wire. With a queue limit of 100 it is possible to send a
small number of bytes on the wire and have the server allocate 1.6MB -
reducing the limit to 16 reduces the allocation to 256KB. This queue will
soon be removed entirely.
DTLS also currently buffers record content from application data where the
handshake has not yet finished. This only buffers the actual content
received on the wire and does not suffer from the same problem, however
reduce the queue size to further limit memory consumption.
ok kenjiro@ tb@
[LLVMAABI][AARCH64] Handle homogeneous aggregate return types (#218799)
This change implements the IsHomogenousAggregate() function, which is
shared across targets, and uses it to implement direct passthrough of
return values that meet the homogeneous aggregate criteria.
I'm also adding a new AArch64ABIOptions object that will be used to
track various conditions that are derived from target settings and must
be accounted for in the ABI handling. This change adds only two options,
IsILP32 and IsMicrosoftCXXABI. Other options are expected and will be
added as they are needed.
This change also revises the not-yet-implemented cases, having them
return Ignore rather than Direct so that they fail in more obvious ways.
This was necessary in order to be able to distinguish a return type that
was classified as Direct because it was a homogeneous aggregate from one
that was classified as Direct because it was an unhandled type.
Assisted-by: Cursor / various models
audio/mpz: the port had been updated to version 2.1.6
Per several requests, switch to Qt 6 by default but keep Qt 5
as an option for those who prefer better user experience over
higher toolkit version number.
PR: 296248
Reported by: portscout
[flang][FIRToMemRef] Treat heap-pointer allocas as static, not as dynamic arrays (#223821)
Whole-array assignment of an allocatable inside !$acc kernels with
-Mstack_arrays aborted on !fir.ref<!fir.heap<!fir.array<?xf32>>>. A
fir.alloca !fir.heap<array> is a local heap pointer, but it was
unwrapped and handled as a dynamic array. The memref converter then
peeled only the outer ref and asserted because !fir.heap is not a memref
element.
Keep the pointer as a static allocation. Make convertibleMemrefType use
the same one-pointer peel as convertMemrefType so a nested pointer is
not treated as an f32 array.
NAS-143641 / 27.0.0-BETA.1 / Stop parsing private keys in certificate.query
certificate.query filled key_type and key_length by loading the private
key of every certificate it returned. Loading an RSA private key runs a
full consistency check, about 2 seconds per RSA-4096 key on the reporter's
system, so a query over 17 certificates took 34 seconds. Parsing the
certificate itself takes well under a millisecond.
Read key_type and key_length from the public key of the certificate, or
of the CSR for a request, which matches the private key for anything that
passed validation at create or import time. Parse the private key only in
the service checks, which run for the one certificate a service is about
to use.
NAS-143641 / 27.0.0-BETA.1 / Run certificate extend in a thread
CertificateServicePart.extend is synchronous and CRUDServicePart calls it
directly, so parsing every certificate and validating every private key
ran on the event loop. On the reporter's system that froze all of
middleware for about 34 seconds on each certificate query. On stable/26
the same work ran in the thread pool because cert_extend was a plain
private method. Make extend async and run normalize_cert_attrs through
to_thread.
[lldb-dap][test] Only check compile units from stack frames for main.c (#223450)
The `test_stack_frame_compile_unit_id` test case added in #222512 checks
that compileUnitId in a stack frame points to the source file. However,
it does so by checking there is only one unique compileUnitId in the
whole stack trace. This may not be true if start.S is included as a
compile unit.
Relax the check by only looking for stack frames that point to main.c.
Also check the other way, i.e. ensure the same compile unit id isn't
referenced by a stack frame that doesn't point to main.c. This way the
test retains its stated goal of making sure the compile unit id resolves
to its source file while also allowing start.S from a different compile
unit to be present.
Linux: skip hardened usercopy checks in zfs_uiomove_iter()
The check adds nothing here. It only verifies the copy stays inside
the source object, and for a vmalloc address that object is the entire
SPL slab, not the buffer. The DMU already bounds every transfer to
the individual dbuf. The user-supplied destination is validated
inside _copy_to_iter() and is unchanged.
fs/proc/kcore.c and drivers/dax/super.c call the underscore variants
for the same reason. Both are EXPORT_SYMBOL and predate 4.18.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <rob.norris at truenas.com>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Reviewed-by: Richard Yao <richard at ryao.dev>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #19115
Introduce in-kernel 'shmid_ds_kern' structure where `shm_nattch' has the
type of uint64_t. The original 'shmid_ds' used to deliver data to the
userland, so API/ABI is not broken. The delivered `shm_nattch' value is
clamped with SHRT_MAX.
ok deraadt
[libc++] Fix query benchmarks for associative containers (#216065)
We were calling get_key and the random number generator in the hot loop.
Instead, create a pool of keys to draw from in the initial setup phase,
and then query these keys in a round-robin fashion.
[libc++] Return a const reference from get_key in benchmarks (#216088)
It was unnecessary to create a temporary string, and in fact it would
have a negative impact on some benchmarks like `erase(key) (existent)`
which called get_key in the hot loop.
Remove the S3 suite's skips
Every skip in the suite was downstream of one thing: the session
tolerating a bucket that would not provision, which left buckets[leaf]
None and made fourteen accessors skip their module. None of the nine
rows has an environmental precondition this lane does not meet -- there
is a pool, sharing.s3.create makes the datasets, and the two licensed
features are mocked entitled before the service starts -- so a row that
will not provision is the defect the suite exists to find. It now fails
the session.
Two vacuous passes with it. The listing case guarded its excluded-bucket
assertion behind a test for the bucket it had just been handed, and the
SOSAPI recommendation case asserted nothing whenever the section was
absent, which is the ordinary answer; the recordsize case already proves
that arm unconditionally.
No skip, xfail or importorskip remains.
Linux: copy whole multi-page bvecs at once
bio_add_page() merges adjacent pages into one bvec only when they are
contiguous both physically and in the memory map, so on kernels without
HIGHMEM the linear map covers an entire bvec and it can be copied with a
single mapping and memcpy() instead of one per page. Drop the blanket
PAGE_SIZE clamp in zfs_uiomove_bvec_impl(), and iterate the blk-mq path
with rq_for_each_bvec() rather than rq_for_each_segment(), which splits
every bvec at a page boundary. For a 1MB zvol read the number of
memcpy() calls per block drops by an order of magnitude, depending on
how well the caller's pages merged.
CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP maps even lowmem pages one at a time,
so PageHighMem() on its own does not tell us whether a mapping spans
the whole bvec. Add zfs_kmap_partial() for that question and use it in
abd_iter_map() too, where the same assumption was already being made.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Rob Norris <rob.norris at truenas.com>
[2 lines not shown]
[libc++] Reword confusing warning message about AppleClang version (#222380)
AppleClang 26.4 is not a thing -- it's AppleClang 21.0 that shipped with
Xcode 26.4.
[SandboxVec][LoadStoreVec] Vectorize load seed chains (#215944)
LoadStoreVec previously only vectorized store bundles. SeedCollection
already emits homogeneous store and load slices separately, so
runOnRegion() now dispatches on the seed kind and calls
vectorizeStores()
or vectorizeLoads() accordingly.
Add vectorizeLoads() to combine consecutive load chains into a single
vector load, unpack for remaining uses, and clean up dead scalar loads
and pointer operands.
Add load_store_vec_load_seeds.ll covering load-only seeds (no uses,
single use, general uses, vector-typed loads, and mixed-type cases), and
extend load_store_vec.ll with a trivial load-then-store case.