ZTS: avoid mixed-layout damage during raidz expansion
Leave the blocks around the reflow offset intact so a scrub can repair
damage that the expansion copies between layouts. Round writes away
from the spared band to whole MiB to reduce the number of I/O calls.
Confine discovery of the exported pool to its own fixture directory
and share the reflow helpers with the boundary repair test.
Assisted-by: OpenAI Codex
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Matthew Ahrens <matt at mahrens.org>
Suggested-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Signed-off-by: Giuseppe Piscitelli <ooonea at gmail.com>
Co-authored-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Closes #19932
[CMake] Migrate CIR and Flang generated-header dependencies
Replace CIR's mlir-headers dependencies and Flang's global MLIR library
lists with their actual library dependencies. Let owners provide
generated headers through the link graph, and remove duplicate ordering
dependencies on foreign IncGen targets.
Declare CIR interface and header ownership explicitly. Keep source
shards, bytecode tables and lowering tables private to their consumers.
Scope accumulated TableGen variables and keep implementation-only
lowering tables out of Clang's global TableGen aggregate.
Include only the dialects and conversion passes registered by Flang.
Preserve the supported registrations and retain MLIR_DEPS for downstream
compatibility. Use compile-only owner links for header-only
dependencies.
Assisted-by: Codex
raidz: lock the full allocation during expansion
Use the block birth width to include parity in the expansion range
lock. Locking only the payload leaves the mapped tail exposed to a
concurrent reflow while reads, writes or repairs still use it.
Additionally, clarify why holding the read range lock also waits for a
reflow copy that starts in the block tail.
Assisted-by: OpenAI Codex
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Signed-off-by: ooonea <ooonea at gmail.com>
Closes #19864
EntryExitInstrumenter: Report unknown instrumentation functions as errors (#248708)
Use emitError instead of report_fatal_error when an
instrument-function-entry or instrument-function-exit attribute names a
function the pass does not know how to call.
Assisted-by: Claude
[clang] Make the PCM alignment test independent of the COFF writer
The test relied on the MC COFF writer happening to place the clangast
section at an unaligned offset. That offset depends on which sections the
writer emits and on the codegen of the ASan module constructor, so
unrelated changes could break the test or quietly make it test nothing.
Instead, re-wrap the AST file in a COFF object built with yaml2obj and
llvm-objcopy, which places the clangast section at a known unaligned
offset, and check that offset exactly.
ZTS: restore tunables that a group's setup changes
- gang_blocks: setup.ksh set metaslab_force_ganging_pct to 0 without
saving it, so cleanup.ksh had nothing to restore and it stayed 0
(default 3) for the rest of the run. enospc_ganging and
removal_with_ganging, which run later and lower
metaslab_force_ganging to force gang blocks, then made no gang
blocks. setup.ksh now saves the gang tunables. The tests, which
can no longer save and restore the same tunables, set the group's
values back in their cleanup.
- mmp_write_distribution: set multihost_history back to the group's
value, first thing in its cleanup.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alan Somers <asomers at gmail.com>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19892
ZTS: detach the loop devices of cache_010_pos and slog_013_pos
On Linux, cache_010_pos and slog_013_pos leave their loop device
attached. slog_013_pos's device still holds testpool's log label, so
later tests in the same boot that look up testpool with "zdb -e" fail
with "more than one matching pool". Each test strips the device path
to its name for zpool add, so cleanup's "losetup -d loop0" fails
("failed to use device") and the failure is ignored.
- Detach the device by its full path, and check that the detach
worked, on FreeBSD and illumos too.
- Keep the path only after the device is attached, so cleanup doesn't
try to detach one that never was.
Reviewed by: George Wilson <gwilson at zfsmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alan Somers <asomers at gmail.com>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19883
kernel: FAST uptime clocks from the kpmap in clock_gettime(2)
The system call answered CLOCK_MONOTONIC_FAST and CLOCK_UPTIME_FAST
with getnanouptime(), which counts from gd_hardclock.time, the next
tick, and so runs up to a tick ahead. After ten calls libc reads
ts_uptime from the kpmap instead, the time of the last tick, so both
clocks stepped back by up to a tick in every process. Zig's
std.time.Instant panics when that happens.
Read the kpmap in the system call as well, with the upticks protocol
from sys/upmap.h. CLOCK_REALTIME_FAST is not affected.
Reviewed-by: @dillon
Bug: https://bugs.dragonflybsd.org/issues/3493
atf-check: Add shortcut for not-exit:0
Allow the command to be preceded by an exclamation point, which changes
the default expected result to a clean exit with a non-zero exit code.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D58099
(cherry picked from commit 76797b9b6ed4f2fe4ebb08fede0f19a88f985494)
drm: zero pages in alloc_page() and alloc_pages() for __GFP_ZERO
alloc_page() and alloc_pages() ignore __GFP_ZERO. alloc_page() calls
vm_page_alloczwq() without VM_ALLOC_ZERO, which hands out the page with
whatever it last held, and vm_page_alloc_contig() does not zero either.
TTM asks for zeroed pages for every buffer a client creates
(TTM_PAGE_FLAG_ZERO_ALLOC) and only clears the pages it reuses from its
own pools. Cached buffers get their pages from alloc_page(), and new
pages for the write-combined and uncached pools come from
alloc_pages(), so a client can map a new buffer and read what the page
held before: freed memory of other processes or the kernel. i915 asks
for zeroed scratch and status pages, and TTM for a zeroed dummy read
page, the same way.
Pass VM_ALLOC_ZERO for __GFP_ZERO in alloc_page(), and zero the pages
in alloc_pages().
Reviewed-by: @dillon
[MLIR][OpenACC] Reject nested acc.compute_region ops (#248712)
An acc.compute_region cannot be nested inside another one. Check this in
ComputeRegionOp::verify, which walks the ancestors of the op, so a
nested region is rejected at any depth. A declarative trait cannot
express this: HasAncestor requires an ancestor but has no negated form.
Add a case to invalid-cg.mlir that expects the diagnostic on the inner
region.
[ctxprof] Write flat profiles for non-rootable functions (#248229)
Functions that cannot become roots, such as those containing musttail
calls, have their CtxRoot field initialized to the non-rootable
sentinel. When serializing flat profiles, check whether a function is an
active root rather than requiring CtxRoot to be null and rootable, so
flat profiles collected for non-rootable functions are not dropped.
draid: fix data loss when a disk is cleared during rebuild
If a disk under a distributed spare is cleared while a sequential
rebuild (resilver) is running, data can be lost in three ways:
- When the rebuild completes, the cleared disk's DTL is excised even
though the rebuild never repaired it. Its spare is then detached,
leaving the stale disk as the only copy.
vdev_dtl_should_excise() now keeps the DTL of leaves that weren't
rebuild targets, so the spare stays attached until a healing
resilver or a scrub has repaired the disk.
- A column served by a distributed spare, whose data at that offset
lives on a device being rebuilt, is read as if it were valid. The
rebuild may not have written that data yet, so the read can return
stale data, which is then used to reconstruct the rebuilt column and
written back by the forced repair.
[14 lines not shown]
[VPlan] Single-scalar VPInstructions only use first lane of operands. (#248702)
Single-scalar VPInstructions only use the first lane of their operands,
independent of their users. Report this in usesFirstLaneOnly and do not
propagate first-lane use through them, removing the cast special case in
replicateByVF and the cases for always-single-scalar opcodes. Assert
that vector-to-scalar opcodes are not marked single-scalar.
Blends only used by single-scalar casts are now costed as scalar
selects.
[mlir][acc] Introduce acc-partition-kernel-loops pass (#248659)
Add a pass that maps the parallel loops of an acc.compute_region onto
the GPU dimensions they were assigned. Each scf.parallel loop carries an
acc.par_dims attribute that lists the dimensions it runs over. The pass
splits the loop so that each loop carries a single dimension, which is
the form the GPU lowering expects. For every non-sequential dimension,
the loop gets an outer loop over the launch width of that dimension. The
original loop becomes sequential and walks the iterations of one lane,
so that neighboring lanes work on neighboring iterations.
```
acc.compute_region launch(%w = %pw_x) {
scf.parallel (%i) = (%lb) to (%ub) step (%s) {
...
} {acc.par_dims = #acc<par_dims[thread_x]>}
}
```
[23 lines not shown]
[lldb] Incl SC UUID in headerbytes cache for old debugservers (#248667)
I added a new caching for lldb for binaries read out of memory, saving
the binary header bytes, in
https://github.com/llvm/llvm-project/pull/231344
It creates a filename for the headerbytes cache based on the filename,
file UUID, and if the binary is inside the Darwin shared cache region,
the shared cache UUID. If the debugserver doesn't report the shared
cache VM range, it would suppress headerbytes caching.
One CI bot was using an older debugserver that did not provide the
shared cache VM region, and the test would fail because the expected
headerbytes file was not found.
This changes the behavior for an old debugserver that fails to report
the shared cache VM region bounds -- now, we will include the shared
cache UUID for the filename of every binary read out of memory on that
system, when caching the headerbytes. This means that a filename which
[13 lines not shown]