[LoongArch] Implement getJumpTableIndex to allow splitting jump table edges (#228550)
This patch implements `getJumpTableIndex` so that `canSplitCriticalEdge`
can split an edge out of an indirect jump through a jump table by
rewriting the jump table entry. See
https://github.com/llvm/llvm-project/pull/224197 for a detailed
explaination.
Recognize the jump table address feeding the PseudoBRIND (and also the
32-bit's LD.W form):
```
%base = PseudoLA_PCREL %jump-table.N
%off = LDX_W %base, %index
%tgt = ADD_D %base, %off
%PseudoBRIND %tgt, 0
```
On SPEC CPU2006 `400.perlbench` this removes all stack accesses from the
`S_regmatch` dispatch block and reduces retired instructions by 2.6% and
L1D loads by 4.5% on the `checkspam` workload.
T6 lockstep: pin the shared boot harness to v0.3.0
v0.3.0 = v0.2.3 plus -device virtio-gpu-pci on the amd64 q35 shape (nextbsd/nextbsd-ci#15). The device is unbound and inert for the img/iso login-only boot gates (no graphics kext in the image); both lanes re-run on this PR to confirm.
[libcxx] Add user to linux-builder docker image (#228933)
Accidentally didn't move this over when copying from the builder-base
image in 84812cba90fe0a0f95544a3ff01da1e61346a68d. Without these we run
as root by default which results in not throwing permission denied
errors when running the test suite.
www/immich-public-proxy: Stop logging to syslog
The lines already go to /var/log/immich, which newsyslog rotates, and
syslog repeated them under the tag "daemon". The process now carries
its own name in ps.
Differential Revision: https://reviews.freebsd.org/D60277
Sponsored by: Netzkommune GmbH
www/immich-ml: Stop logging to syslog
The lines already go to /var/log/immich, which newsyslog rotates, and
syslog repeated them under the tag "daemon". The process now carries
its own name in ps.
Differential Revision: https://reviews.freebsd.org/D60277
Sponsored by: Netzkommune GmbH
www/immich: Stop logging to syslog
The lines already go to /var/log/immich, which newsyslog rotates, and
syslog repeated them under the tag "daemon". The process now carries
its own name in ps.
Differential Revision: https://reviews.freebsd.org/D60277
Sponsored by: Netzkommune GmbH
ffs: revalidate mkdir dependencies after vnode lookup
flush_pagedep_deps() drops the soft updates lock while obtaining the
vnode of a newly created directory with get_parent_vp(). The
MKDIR_BODY dependency may complete during this interval, invalidating
the diradd selected before the lock was dropped.
Once the directory's allocdirect is retired, the lookup of its first
block by block number in flush_newblk_dep() can find an older
dependency for a previous use of the same physical block. The newblk
hash is not unique by block number: when ffs_reallocblks() relocates a
cluster, the completed allocindirs of the old blocks stay on the
indirdep's ir_completehd until the indirect block pointer in the inode
is written, while the old blocks are already free and may be allocated
to a new directory. flush_newblk_dep() then finds a D_ALLOCINDIR where
it expects a D_ALLOCDIRECT and panics with "flush_newblk_dep: Bad
newblk".
Retain the vnode returned by get_parent_vp(), reacquire the soft
[33 lines not shown]
stress2: add a reproducer for the flush_newblk_dep() "Bad newblk" panic
flush_pagedep_deps() drops the soft updates lock to obtain the vnode of
a new directory. If its MKDIR_BODY dependency completes in that window,
the lookup of the directory's first block in flush_newblk_dep() can find
a stale allocindir left behind by a previous owner of the same block,
relocated by ffs_reallocblks() and freed, and panic.
The test grows interleaved files past UFS_NDADDR to keep clusters being
relocated, while other workers create subdirectories in a parent with
IN_ENDOFF set, so that ffs_vput_pair() syncs it, and fsync() them to
complete the mkdir dependencies. The file system layout and the way
the writers put their blocks on disk are arranged so that a new
directory takes over a freed block whose dependency is still retained;
the details are in the script. With dtrace=1, the test also counts how
often this precondition is met, which works on a fixed kernel too.
PR: 297976
Reviewed by: kib, pho
[3 lines not shown]
g_part: access leak causes process to hang
So if one inserts a USB drive with a GPT that doesn't match the media
size, a resize is initiated, so gpart takes g_access(cp, 1, 1, 1) on the
disk and holds it until the resize is accepted or rejected. The orphan
path releases it, but the spoil path does not. So if the drive is
ejected while the resize is in flight, we call spoil directly, without
releasing the access. Since gpt_opened is not cleared for the spoil
path, this causes several different process to hang in the open path
waiting for the leaked access.
Move the release into the wither function when gpt_opened is set, and
remove the release elsewhere. Since all paths to destroy the geom pass
through wither, this ensure that access is always released when we've
taken the access for resize.
PR: 297777
Reported by: Rick Richard
MFC After: 1 week
[2 lines not shown]