Public bug reported:

[Impact]

The linux-nvidia kernels carry an NVIDIA-specific quirk that identifies
Olympus CPUs by MIDR and enables PE0 prioritization. The upstream solution
provides the generic sched_smt_asym_packing=on boot option instead,
allowing the policy to be enabled without identifying specific CPU models.

PE0 prioritization remains important on NVIDIA Vera. Alternating the
active SMT sibling across wakeups can prevent the other sibling from
remaining idle long enough to restore full single-thread resources,
causing persistent performance loss.

This change re-aligns the existing fix from LP: #2166486 with upstream,
enabling sched_smt_asym_packing by default on arm64 to preserve the
intended placement policy. Users can disable the override with
sched_smt_asym_packing=off.

[Fix]

Replace the NVIDIA-specific quirk and earlier scheduler implementation
by applying the following upstream commits:

c8fc4136fd3c ("sched/fair: Honor asymmetric SMT priority in idle selection")
648d44bda731 ("sched/topology: Add asymmetric SMT packing override")

The scheduler honors SD_ASYM_PACKING when selecting an available SMT
sibling. The sched_smt_asym_packing=on boot option enables this policy
when firmware does not describe the preferred sibling ordering.

Enable the option by default on arm64 in linux-nvidia so Vera systems
retain PE0 prioritization without additional boot configuration.
sched_smt_asym_packing=off restores the architecture-provided topology.
Other architectures retain the upstream default.

[Test plan]

Run the benchblas and OpenBLAS GEMM benchmarks on NVIDIA Vera, comparing
the existing kernel with the updated kernel.

Use one worker per physical core, allowing either SMT sibling within
the selected cores. Repeat runs and compare throughput and variability.
Verify that workloads preferentially settle on PE0 when both siblings
are available and that task affinity remains respected.

Repeat with sched_smt_asym_packing=off to verify that the override can
be disabled, and with sched_smt_asym_packing=on to verify explicit
enablement.

Expected results: the upstream implementation should preserve the
performance benefits of the existing NVIDIA quirk. Based on testing
on a Vera system, PE0 prioritization improves throughput from
approximately 9.4 TFLOP/s to 10.1 TFLOP/s, about 7.4%, for an 88-thread
single-precision GEMM workload on the 88 physical cores of NUMA node 0.
It also reduces run-to-run variability.

[Regression potential]

The changes affect scheduler idle CPU selection and SMT domain flags.
Incorrect sibling selection could affect throughput, wakeup latency,
or task placement.

Enabling the override by default on arm64 also affects SMT systems
beyond NVIDIA Olympus. Systems with a different preferred sibling
ordering could experience performance changes. Architecture-provided
priorities remain authoritative, and equal priorities establish no
sibling preference.

Non-SMT systems bypass sibling selection. Other architectures retain
their existing topology unless the boot option is explicitly enabled.
The override can be disabled with sched_smt_asym_packing=off.

Reference bug LP: #2166486

** Affects: linux-nvidia (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-nvidia (Ubuntu Resolute)
     Importance: Undecided
         Status: New

** Also affects: linux-nvidia (Ubuntu Resolute)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173514

Title:
  Align SMT PE0 prioritization with upstream in linux-nvidia

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2173514/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to