Don't busy-loop in txg_sync_thread() while the pool is suspended
Since c3f2f1aa2 ("vdev probe to slow disk can stall mmp write
checker"), txg_sync_thread() skips the sync of a suspended pool with a
bare "continue". Whatever ended its wait (an expired txg timer, a
txg_wait_synced() caller, an active scan or pending frees) stays true
while the pool is suspended, so the thread loops without sleeping,
holding tx_sync_lock, until the pool resumes. An exiting thread loops
forever.
A pool suspended while no txg is syncing, which is how an MMP
suspension usually happens, therefore costs a whole CPU. Kernels
without full preemption report soft lockups and RCU stalls, and every
caller of txg_wait_synced() or txg_wait_open() blocks on the mutex
instead of the condvar, so TXG_WAIT_SIGNAL and TXG_WAIT_SUSPEND waits
can no longer be interrupted or return early.
Wait on tx_sync_more_cv for up to a second instead, and let an exiting
thread go on to exit.
[6 lines not shown]
ZTS: txg_sync must not spin on a suspended pool
Add fault/suspend_txg_sync_idle. It suspends a single-vdev pool while
no txg is syncing: a read error starts a vdev probe, the probe's label
write fails, and the async thread faults the vdev and suspends the
pool. It then checks that txg_sync uses almost no CPU while a read and
a write wait for the pool to resume, and that "zpool clear" resumes the
pool, with both completing and the data intact after an export and
import.
Without a fix, txg_sync runs at 100% of a CPU from the moment the txg
timer expires until the pool resumes.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Closes #19815
ZTS: avoid rate limiting consecutive deadman checks
The one-second deadman timer can fire just under one second after its
previous invocation. With the default one event per second, that check
is rate limited and deadman_sync can report only two of its expected
three events. A FreeBSD trace confirms EBUSY from zfs_ereport_post()
when successive checks arrive less than a second apart.
Allow two events per second during this test and restore the original
limit afterwards. Keep the three-event assertion; deadman_ratelimit
separately checks the event rate limit.
Assisted-by: OpenAI Codex
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: ooonea <ooonea at gmail.com>
Closes #19851
website: Add 2027 events
Oh yeah, that's right, none of this "two weeks out" update,
we're adding the whole entire 2027, and it's still 2026 :)
Some of these do not have a finalized date and will need attention.
Reviewed by: bcr, hrs
Discussed with: adrian, cperciva
Differential Revision: https://reviews.freebsd.org/D61237
aio_mlock.2: Expand document description
+ The old one renders broken because Xr is not correct/portable in Nd
+ Take this opportunity to explain it better using mlock description
MFC after: 3 days
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D61334
[GlobalISel] Address cache hint test review feedback
Remove redundant intrinsic declarations and add a separate SelectionDAG test documenting the currently dropped X86 target-intrinsic cache hint.
clang: Don't set redundant intrinsic callsite attributes
Clang has a bad habit of spamming unnecessary callsite attributes that
are redundant with the function declaration. Fix one common source on
emitted intrinsics.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[BOLT] Preserve .cfi_signal_frame when rewriting .eh_frame (#242044)
BOLT dropped the "S" CIE augmentation emitted by .cfi_signal_frame, so
every rewritten FDE was placed under a plain "zR" CIE. Unwinders that
detect signal trampolines from CFI (lldb after #237016) then fail
to recognize them in BOLTed binaries.
Record the signal frame flag from the input CIE and re-emit it with
emitCFISignalFrame().
Assisted-by: Claude Opus 5.5
Test Plan: added bolt/test/X86/cfi-signal-frame.s
[LoongArch][NFC] Move XOR combine into performXORCombine
Extract the inline ISD::XOR handling in PerformDAGCombine into a
dedicated performXORCombine helper, matching how the other opcodes
(AND, OR, SETCC, ...) are structured. No functional change.
Also fix a clang-format issue in emitPseudoVMSKCOND.
Assisted-By: LLM
Revert "[DwarfDebug] Add applyDwarfVersion() so the targets like NVPTX can recompute the version-derived state" (#242150)
Reverts llvm/llvm-project#234510 as this PR introduce build breakage on
pre/post submit builders.
kernel - Work around forced umount race in nullfs
* Partial work-around for a umount race against a
call to statfs() through a null mount. Check
that mp->mnt_data is not NULL.
[DAGCombiner] Rebuild FMA chain instead of mutating it in place (#241188)
visitFADDForFMACombine folds
fadd (fma A, B, (fmul C, D)), E --> fma A, B, (fma C, D, E)
by replacing the inner fmul in place with ReplaceAllUsesOfValueWith.
If fma A, B, (fma C, D, E) already exists, e.g. when another expression
adds the same terms in a different order, CSE merges the updated chain
into it and the outer fadd becomes
fadd (fma A, B, (fma C, D, E)), E
The combine returns this outer fadd, retaining the extra addition of E.
If an identical fadd already exists, the outer fadd is CSE'd away while
being visited.
Rebuild the chain with getNode instead, and drop the DELETED_NODE check
in visitFADD.