[lldb] Move RegisterFlags from Target to Utility (#206861)
I'm doing this so that I can move RegisterInfo from
`lldb-private-types.h` to lldbUtility. It currently has a `RegisterFlags
*` field, so having it sit in lldb-private-types.h masks the actual
layering of our data types.
I considered moving RegisterInfo into Target, but RegisterValue (in
lldbUtility) uses RegisterInfo directly. Because RegisterFlags has no
internal dependencies, it seemed better to sink that instead.
[AMDGPU] Fold constant offsets into named barrier addresses (#205216)
Allow isOffsetFoldingLegal to fold a constant offset into an LDS
named-barrier global, and include the node offset when materializing the
LDS address in LowerGlobalAddress. `s_barrier_signal_var` on a GEP'd
named barrier now selects the immediate form, matching a bare global and
GlobalISel.
[lit] Truncate process output to 10 kiB (#206355)
The output of processes is transformed multiple times:
1. All non-piped/redirected output of processes is collected
(communicate() for the last process of the pipe, read() for all
previous.)
- It's not good that we *collect* the entire output at all (frequent
realloc+memcpy for large buffers) and I'd rather not have a
possibly large output stored in Python at all.
2. The output is converted into strings (memcpy/utf-8 decode) and stored
in the results list of executeScriptInternal.
3. executeScriptInternal builds the debug output combining all these
stdout/stderr.
- It performs a lot of `out += ...`, which allocates (malloc+memcpy)
a new string every time. There are many of these concatenations.
4. The combined debug output is returned (together with other things) to
_runShTest, which determines whether the test passed, executing the
test multiple times if necessary. It also string-formats the output.
[23 lines not shown]
[NFC][AMDGPU] Use SIInstrFlags predicates in MCA (#206761)
Replace raw TSFlags accesses with SIInstrFlags predicate calls in
AMDGPUCustomBehaviour.
Part of a series following the introduction of SIInstrFlags predicates.
NAS-141614 / 27.0.0-BETA.1 / Convert usage plugin to the typesafe port pattern (#19235)
## Context
The `usage` service is `private = True` with no over-the-wire API
surface, so it is converted to the typesafe port pattern rather than
being Pydantic-ified: a lean `Service` shim delegating to fully
type-annotated module functions, keeping the existing dict return
shapes. The namespace was previously a legacy compound service split
across `usage.py` and `usage_/firstboot.py` and registered by
auto-discovery.
## Solution
- **Consolidated into a `usage/` package.** `usage.py` and `usage_/`
collapse into one package whose `UsageService` exposes the middleware
entry points (`start`, `firstboot`) plus a private `gather` method that
returns the full compiled stats payload for debugging what is and isn't
being collected; the gather/submit logic lives in typed module functions
(`gather.py`, `submit.py`, `run.py`, `firstboot.py`). Registered
explicitly in `main.py`'s `ServiceContainer` and added to `mypy.yml`.
[15 lines not shown]
NAS-141582 / 27.0.0-BETA.1 / mypy mako templates (#19221)
New CI step to type-check mako templates. Most of them are already good
(the ones that are now specified explicitly). Step-by-step we can
inspect the rest.
The output will map compiled python file line numbers to the original
mako file line numbers. It will also show the surrounding lines in the
compiled file so we can see what code is actually being inspected.
```
etc_files/pam.d/truenas-session.mako:21: error: Item "None" of "tuple[PAMLine, ...] | None" has no attribute "__iter__" (not iterable) [union-attr]
37 | __M_writer('# PAM configuration for the middleware (Web UI / API login)\n\n')
38 | if ds_auth:
39 | __M_writer('@include common-session-noninteractive\n')
40 | else:
41 | __M_writer('session [default=1]\t\t\tpam_permit.so\nsession\trequisite\t\t\tpam_deny.so\nsession\trequired\t\t\tpam_permit.so\n')
42 | __M_writer(str('\n'.join(line.as_conf() for line in STANDALONE_SESSION.secondary if line.pam_module is not PAMModule.MKHOMEDIR)))
^
43 | __M_writer('\n')
[5 lines not shown]
Convert usage plugin to the typesafe port pattern
## Context
The `usage` service is `private = True` with no over-the-wire API surface, so it is converted to the typesafe port pattern rather than being Pydantic-ified: a lean `Service` shim delegating to fully type-annotated module functions, keeping the existing dict return shapes. The namespace was previously a legacy compound service split across `usage.py` and `usage_/firstboot.py` and registered by auto-discovery.
## Solution
- **Consolidated into a `usage/` package.** `usage.py` and `usage_/` collapse into one package whose `UsageService` exposes the middleware entry points (`start`, `firstboot`) plus a private `gather` method that returns the full compiled stats payload for debugging what is and isn't being collected; the gather/submit logic lives in typed module functions (`gather.py`, `submit.py`, `run.py`, `firstboot.py`). Registered explicitly in `main.py`'s `ServiceContainer` and added to `mypy.yml`.
- **Replaced the dynamic dispatch with a decorator registry.** The old `dir(self)` + `usage.{func}` string dispatch becomes a `@gather_stat` registry — adding a stat is still just writing a decorated function, but it is fully typed and removes the magic-string call, so every same-process `usage.*` call (including `lifecycle.py`'s `usage.firstboot`) is now `call2`. `gather` stays synchronous and runs via `run_in_thread`, with async stat functions driven on the loop through `run_coroutine`, preserving the original threading.
- **Module functions take the owning `service`** so `service.call2(service.s.app.query)` resolves through `CallMixin` (bare `middleware.call2` mistypes the overloaded pass_app `query`); the VM display-device branch is narrowed with `isinstance(VMDisplayDevice)`.
[mlir][sme] Update the multi-tile e2e example (#202979)
These changes enable hoisting of the accumulator load/store operations
out of the K loop.
Many thanks to @steplong for identifying the missing steps (see #201562)
zpl_ctldir: remove comments describing ancient kernel behaviour
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: move the invalid dentry check up to zpl_snapdir_automount()
If the dentry is invalid, don't even bother calling
zfsctl_snapshot_mount(). There's no practical change here, but it just
helps keep the notion of "invalidated dentry" in the binding.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: remove flags arg to zfsctl_snapshot_mount()
Always set to 0, and never read anyway.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: remove flags arg to zfsctl_snapshot_unmount()
On FreeBSD, its ignored. On Linux, it's set to either MNT_EXPIRE or
MNT_FORCE, with MNT_FORCE adding the -f switch to the userspace
unmount(8) call. However, MNT_FORCE to umount(2) simply causes an early
call into sb->umount_begin() early in the unmount process, which we do
not implement. Therefore, it is effectively a no-op, and we can remove
it.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: remove delay param for zfsctl_snapshot_unmount_delay()
It's always set to the zfs_expire_snapshot tunable and never changed.
There's no need to thread it through.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: use dmu_objset_spa() to get spa pointer
Just for slightly easier readability against dmu_objset_id(), which is
often right near it.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: remove unused args to zfsctl_snapshot_alloc()
Since 4ce030e025 (2025) these have always been null/zero, which those
fields already are, so there's no need for them.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722
zfs_ctldir: remove se_root_dentry
Unused field since 9b77d1c958 (2017).
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18722