[Support] Don't create unbuffered stream in MirroringOutputBackend (#220648)
MirroringOutputBackend is creating underlying stream to be unbuffered
with the intention to avoid double buffering. But if mirrored stream
needs to perform file system write, this results in unbuffered write to
file system and can cause significant I/O overhead which completely
outweights the benefit. Disable the default unbuffered stream setting to
fix the slowdown when using MirroringOutputBackend.
rdar://186469637
CI: force GRUB onto serial console for headless VM
The QEMU CI VMs have no display device. When the
deps step powers the VM off and the build step
restarts it, grub2-mkconfig emits
'terminal_output gfxterm', which leaves GRUB stuck
before the kernel starts on the headless VM, so SSH
never comes up (seen on CentOS Stream 10). Force
GRUB_TERMINAL_INPUT/OUTPUT to the serial console,
which is always present in these VMs.
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: tiehexue <tiehexue at hotmail.com>
Closes #19002
[mlir][math][NFC] Avoid greedy rewriter in sincos fusion (#220687)
This pass only pairs a math.sin with a matching math.cos in the
same block. Running that through applyPatternsGreedily still folds,
CSEs constants, and simplifies regions over the whole module for up to
ten iterations, which dominates the cost of the pass on large modules.
Replace the greedy driver with a walk over math.sin that looks at the
operand's users. Collect fusion pairs first so replacing a math.cos
cannot invalidate the walk, and pick the earliest unpaired matching
cos so the result does not depend on use-list order.
zstream: self-tuning queues
This PR removes the `qp_batch_budget` and `qp_queue_length` parameters
from the `zq_params_t` struct that's used to create `zstream_queues.`
Queue lengths and batch budgets still exist, but they're set internally
by the queue implementation. In addition, `ZQ_MAX_BATCH` is raised to
1024 items.
### Motivation
Multithreaded queues need some specific value for queue lengths and
batch sizes, but the impact of these values is largely opaque to
developers without detailed benchmarking.
Queue lengths in particular have been difficult to optimize because they
were formerly the only way to limit the amount of in-flight stream
data. Streams vary in payload density, so queue lengths were set
according to relatively pessimistic assumptions. But as of #18982, the
memory consumed by in-flight payloads is limited independently of queue
[102 lines not shown]
[AMDGPU][SIInsertWaitcnts] Fix soft wait removal with loop-carried deps (#220357)
The code that checked if a soft waitcnt (such as the one insterted by
a release fence on LDS) was redundant didn't correctly account for the
fact that that, for example, the previous iteration of a loop could
have introduced memory traffic that needs to be waited on. This bug
appeared to be fairly rare in practice (probably due to the
instruction scheduler shuffling around code in t bad form) but it can
happen.
The fix is that, instad of immediately erasing "redundant" waits, we
add them to a set of waits to be erased, and then remove them from the
set if they prove to be truly redundant.
This has the side effect of fixing a correctness issue around the CAS
loops we emit on gfx1250 - the global_inv we emit after the
`s_loadcnt 0x0` is itself a `loadcnt`-able event, and so needs to be
forced to completion before the next iteration of the CAS loop.
[6 lines not shown]
[bazel][lldb] Update lldb's BUILD.bazel file to fix failure. (#220692)
https://github.com/llvm/llvm-project/pull/216389 introduced some new
dependencies for some lldb Plugin builds that were not reflected in the
bazel file. This fixes that issue.
Make vmm(4) exception helpers return void.
None of the vmm_inject_{gp,ud,etc.}() functions can fail. There's
no need to return 0 for all of them, so simplify the function
signature and update call sites to clean things up a bit.
sure, mlarkin@
[lldb] Parse GDB remote register vector types (#219255)
- Add the `RegisterTypeVector` metadata representation.
- Parse `<vector>` elements from GDB target-description XML.
- Support builtin elements and previously defined nested vectors.
- Validate counts, sizes, duplicates, unsupported types, and feature
scoping.
- Display the vector element count in `register info`.
- Add parsing, serialization, nesting, and invalid-input tests.
Nested example:
```
<vector id="v2f" type="ieee_single" count="2"/>
<vector id="v2v2f" type="v2f" count="2"/>
```
`v2v2f` contains two elements, each containing two floats.
---------
Co-authored-by: Bar Soloveychik <barsolo at fb.com>
vmm(4): classify injected #DB as hardware exception.
vmm was incorrectly classifying as a software exception. Change to
hardware exception without an error code.
ok mlarkin@
[flang][acc] Extend coverage for offload target verifier (#220468)
This PR builds upon acc::isValidSymbolUse and acc::isValidValueUse to
ensure that FIR and CUF specific handling is considered.
FIR now provides fir::acc::isValidSymbolUse and
fir::acc::isValidValueUse. Symbol uses treat Fortran runtime and
non-host CUDA Fortran procedures as valid, and accept fir.use_stmt
references that may have no local definition. Value uses accept FIR
scalars that are passed by value, including those reachable through
declare and similar wrappers, and allow trivially copyable scalars into
CUF kernels.
The OpenACC analysis delegates to these utilities. The dialect helpers
are extended so symbols defined in a gpu.module and arguments of an acc
routine are treated as already on the device.
[flang][OpenMP] Implement modifier set and modifier group verification
Introduce modifier set and group definitions, and include that information
in clause descriptors.
Extend the verification of syntactic properties to handle sets and groups.
[flang][OpenMP] Replace modifier verification with a generic one
Implement verification of syntactic properties (i.e. required, unique,
exclusive, ultimate) in a generic way, agnostic of the kind of element
to which these properties are applied. The goal here is to reuse it
for verifying clause properties in the future.
Refactor the existing modifier verification code to use it. Modify
the previous implementation (OmpVerifyModifiers) to always succeed
to reduce the amount of necessary changes.
dtrace/tests: compile D sources at runtime on test target
Previously, we would precompile D test dependencies using the
host's dtrace, which unconditionally outputs ELF files in the
host's format. This breaks the cross-compile build with errors
like the following:
dtrace: failed to link script: incorrect ELF machine type for
object file: tst.usdt.pieo
--- usdt.o ---
*** Failed target: usdt.o
This patch moves compilation to runtime for all C-based testcases
that have a dependent D source file.
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59030
[AArch64][PAC] Emit tail calls more efficiently
It may be required to insert explicit checks that LR was authenticated
successfully before performing a tail call. Previously, such checks were
inserted when expanding the TCRETURN pseudo instructions, if the stack
frame was created by the particular function. This did not take into
account the shrink-wrapping optimization, though.
This commit introduces a separate `PAUTH_CHECK_LR` pseudo instruction.
A conservative heuristic is implemented that drops the completely useless
checks. Furthermore, it moves the remaining checks to the shrink-wrapping
epilogue (if any), but only if that doesn't hurt any regular return code
paths.
[AArch64][PAC] Precommit tests on efficient LR checks before tail calls
When performing a tail call with pac-ret hardening enabled, depending on
the performance vs. security trade-off, it may be required to insert an
explicit check that the LR register contains a valid address (that is,
the authentication succeeded), as unlike a regular call, a tail call does
not dereference LR right away.
When shrink-wrapping optimization is in effect, this might be expensive
both in terms of time complexity and code size. This commit adds several
tests demonstrating the existing codegen behavior.
[AMDGPU] Carry the log expansion flags through its f32 round trip (#219724)
The f16 log and log10 expansion promotes to f32 and rounds back.
GlobalISel built that G_FPEXT and G_FPTRUNC pair with no flags at all,
where the SelectionDAG FP_EXTEND and FP_ROUND have always carried them,
so hand them the expansion's flags too.
Add an S3 key type to API keys
An S3 key is a SigV4 credential for the TrueNAS S3 service. It shares
the API key table so it gets the same user linking, expiry, revocation
and reveal once handling, but it stores a recoverable secret instead of
SCRAM verifier material because SigV4 derives signing keys from the
secret itself. The secret is popped in extend so it appears in no entry
and reaches the S3 service only through the private s3_credentials
method, which folds revocation, expiry and a secret lost to a seedless
config restore into one enabled flag.
An S3 key can never authenticate to the TrueNAS API. The pam etc group
now selects TRUENAS keys only, which keeps S3 keys out of the keyring
every mechanism authenticates against, the keyring renderer carries a
backstop, and the plain key login refuses an S3 key before PAM so a
keyring miss cannot trigger the forced PAM regeneration. The upload
authenticator, the legacy login and convert_raw_key refuse them too.
S3 keys need no privilege roles and may belong to local or directory
[4 lines not shown]
interfaces: exclude VLAN devices from virtual queue #10810
They were handled properly in dhcp6c cases later on, but that
changed when they became visible to through the device hook.
[libc][CPP] Align span copy and conversion with std::span (#220619)
Bring cpp::span copy and converting operations in line with C++20
std::span ([span.overview], [span.cons]):
* Add defaulted copy assignment operator: C++20 std::span declares
constexpr span& operator=(const span&) noexcept = default; Providing an
explicit defaulted copy assignment operator matches std::span and avoids
-Wdeprecated-copy-with-dtor warnings in consuming code when
copy-assigning spans.
* Take const span<U>& in converting constructor and operator=: C++20
[span.cons] specifies converting construction from const span&.
Previously taking span<U>& prevented converting from const spans and
binding to rvalue temporaries (such as s = s.subspan(1)).
* Update span.h and span_test.cpp headers to standard LLVM style.
* Add unit tests for copy assignment, rvalue temporaries, and converting
[2 lines not shown]
[Matrix] Implement matrix support for the `max` and `min` intrinsics (#219537)
Closes #184511 and #184512.
This PR implements the matrix api for `max` and `min` in
`HLSLintrinsics.td`, adds matrix codegen tests, matrix sema tests, and
SPIRV matrix backend tests. DirectX matrix backend tests were not added
because no DirectX backend changes were made.
Assisted-by: Claude Opus 4.8