[NvlinkWrapper] opt-remarks-filter -> opt-remarks-passes
`renderRemarksOptions` in Clang's `CommonArgs.cpp` translates
`-foptimization-record-passes` to `--plugin-opt=opt-remarks-passes`.
`lld` expects that, but `clang-nvlink-wrapper` currently expects
`--plugin-opt=opt-remarks-filter` instead, producing errors like:
```
clang-nvlink-wrapper: Unknown command line argument opt-remarks-passes=inline
```
In `NVLinkOpts.td` for `clang-nvlink-wrapper`, this patch adds
`--plugin-opt=opt-remarks-passes` and makes
`--plugin-opt=opt-remarks-filter` an alias. If there are no users of
the latter, we can consider removing it.
Assisted-by: LLM
[CIR] Implement 'dsoLocal and 'protected visibility' (#240985)
This patch implements the setDSOLocal and protectedVisibility missing
features. These are both required to get the 'dso_local' to show up
correctly on RTTI members and to get their visibility correct.
Previously, we approximated it based on the MLIR public/private-ness,
but this doesn't take into account the visibility attribute, nor RTTI
correctly.
This patch adds that, and adds testing for all of the places this
changes. However, note that LLVM-IR will not print dso_local if it is
'implied' so it wasn't as obvious that it was not correctly marked in
CIR (but LLVM-IR effectively 'got it right').
Additionally, mlir default-sets declarations as 'private', so we were
missing a few cases where the linkage wasn't being set properly. This
patch ALSO updates those. This again is something that doesn't really
end up in the LLVM-IR, just in the MLIR types however, so it isn't
really visible, just another 'correctness' fix.
Add LIO per-I_T-nexus UA/PR and HA failover tests
test_266: LIO ALUA, single node and HA, including hard failover.
test_267: unit attentions are queued and reported per I_T nexus.
test_268: PR identity: ISID, ports, unregistered nexuses.
test_269: PR state across failover and failback (S7 to S22).
conftest.py and iscsi_ua_pr_utils.py hold the shared fixtures and
helpers; the fixtures are opt-in and the existing tests are unaffected.
Add context_params to iscsi_scsi_connect()
Pass an optional context_params dict through to python-scsi's
init_device(), so a test can set pre-login iscsi.Context options such
as an explicit ISID. context_params_supported() lets callers skip when
the installed python-scsi predates it.
Also ruff.
Check S22's holder by access, not by READ FULL STATUS port
check_s22 looked for the holding registration by its RELATIVE TARGET
PORT IDENTIFIER in READ FULL STATUS. For an ALL_TG_PT registration that
field is not defined (SPC-5 6.16.4) and LIO reports 0, so the check
failed in every phase although the state was correct.
Assert instead that every registration belongs to the ALL_TG_PT
initiator port and that exactly one holds the reservation, and identify
the holding port by access: through the STANDBY port the nexus has a
holder's access, through the ACTIVE port a registered non-holder's.
Harden LIO ALUA state updates on failover
Log and skip a failed write to one storage object's ALUA group instead
of aborting, and do not let an ALUA error abort vrrp_master.
On takeover, set both controller groups to TRANSITIONING before pool
import; the peer's group still held ACTIVE_OPTIMIZED from when this node
was STANDBY.
When the STANDBY syncs, retry the ACTIVE's refresh_alua_states until it
gives the STANDBY's group NONOPTIMIZED. The ACTIVE's own ha_state can lag,
and one missed refresh left the group UNAVAILABLE until the next reload.
Reload lio_ha as STANDBY when demoted without a reboot
vrrp_backup started iscsitarget in LIO mode, which does not reload a
loaded lio_ha. A node demoted without a reboot kept the lio_ha it had
as ACTIVE, with forwarding cleared: as BACKUP it did not forward, and
lio_ha now refuses to set forwarding again. Restart iscsitarget in
that case, which reloads lio_ha with default_forward_active=1.
Add middleware support for LIO ALUA HA
Wire up the middleware side of LIO ALUA high-availability: load
lio_ha.ko with per-node addresses on service start, manage ALUA
state across failover events, clean up STANDBY configfs on pool
export, and add pre-flight validation that targets have static
initiator ACLs before ALUA can be enabled.
For each target, create a portal-less phantom TPG carrying the peer
node's controller group so that a single RTPG response from any
connected port lists both ALUA groups. Write tpgt_N/rtpi explicitly
before enable so that relative target port IDs in RTPG match the
tag formula (portal.tag on Node A, portal.tag + 32000 on Node B)
rather than being auto-assigned sequentially by the kernel.
ALUA group states are driven by role and ha_state:
MASTER + synced local=OPTIMIZED remote=NONOPTIMIZED
MASTER + connected local=OPTIMIZED remote=TRANSITIONING
[4 lines not shown]
Set the peer's ALUA group when LIO becomes ACTIVE
On takeover, set_alua_active() wrote only the local controller group.
The peer's group kept the value this node had given it while STANDBY,
ACTIVE/OPTIMIZED. Nothing else rewrote it until the peer came back,
reached lio_ha 'synced' and called refresh_alua_states() on this node.
Until then, REPORT TARGET PORT GROUPS advertised the down peer as the
optimized path. If that remote call failed, the wrong state stayed,
because the failure is only logged.
set_alua_active() now writes both groups. The local group becomes
OPTIMIZED, and the peer's group gets the state the ACTIVE node gives
for the current ha_state: NONOPTIMIZED when synced, UNAVAILABLE when
disconnected, otherwise TRANSITIONING.
refresh_alua_states() uses the same table, so the disconnected case now
writes UNAVAILABLE rather than TRANSITIONING. That matches the table in
utils/lio/config.py, so the reconciler and the event handlers no longer
disagree about the peer's state.
[AMDGPU] Reduce resource align when shrinking buffer loads
Since the `align` on buffer intrinsics includes the offset argument,
the demand, `simplifyAMDGCNMemoryIntrinsicDemanded` needs to account
for the value added to that offset, which might reduce the alignment
of the load.
AI disclosure: Claude wrote the code, I looked at it and wrote the
commit message.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Pre-commit tests for buffer load shrinking with align (#240944)
Buffer load demanded elements analysis isn't shrinking the `align`
annotated on the intrinsic correctly.
AI disclosure: Claude wrote these, I wrote this message
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Attributor: Fix light-preserved-analyses.ll with GCC-built opt (#241016)
The printed RequireAnalysisPass type name depends on the host
compiler. GCC omits the defaulted AnalysisManager template argument,
so the check line failed on GCC-built bots. Match it with a regex like
the other pass manager tests.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>