DRIVE AGX Thor: 70–80 µs cyclictest tail on isolated CPUs with no guest idle — HV scheduling/RT parameters

Hello,

We are debugging RT latency on a DRIVE AGX Thor platform and would like guidance on PCT/hypervisor scheduling parameters.

Setup

  • DRIVE OS 7.0.5 (PDK 7050); Linux guest kernel 6.1.132-rt49-rt-tegra (PREEMPT_RT).
  • 12-vCPU Linux guest; 14 physical CPUs.
  • vCPU mapping (pct.json): vcpu0..10 -> pCPU1..11, vcpu11 -> pCPU0. RT vCPUs are vcpu7..10 -> pCPU8..11.
  • No native servers are assigned to pCPU8..11 (servers are on pCPU0; DU server on pCPU2).
  • Guest cmdline: isolcpus=domain,managed_irq,7-10 nohz_full=7-10 rcu_nocbs=7-10 irqaffinity=0-6,11.
  • PCT vcpu_conf for vcpu7..10: priority = 2, timeslice = 40 µs, grace_preempt_period = 10.
  • cyclictest: -m -u -p 95 -a 7-10 -t 4 -i 1000 -h 200.
  • Background load: stress-ng --cpu 8 pinned to the housekeeping CPUs (0-6,11).

Observation 1 — HV cost on idle pCPUs

  • With the isolated CPUs idle between test periods, pct top shows HV ~0.5–0.6% on pCPU8..11, versus ~0.06–0.27% on the busy pCPU0..7. That is roughly 5 µs per 1 ms cycle of deterministic idle-path cost.

Observation 2 — removing guest idle does not remove the tail

  • To remove guest idle entirely, we pinned one SCHED_OTHER spinner (yes > /dev/null) to each of CPU7..10; the FIFO cyclictest threads preempt them. The isolated CPUs never enter cpuidle.
  • 79-minute run (~4.7M cycles per thread), no guest idle:
    • T0: Min 5, Avg 6, Max 31 µs
    • T1: Min 2, Avg 2, Max 73 µs
    • T2: Min 2, Avg 4, Max 76 µs
    • T3: Min 5, Avg 6, Max 78 µs
  • The floor is very good (2–6 µs), but the 70–80 µs rare tail remains. In earlier timerlat runs p99.9 was ≤4 µs, so this is a rare tail, not a per-cycle cost.
  • Disabling cpuidle states in the guest did not change the tail: the kernel falls back to state0 (cpuidle_enter_state ignores the disable flag for the fallback, and guest idle is PSCI CPU_SUSPEND via psci_idle).

Questions

  1. What are the recommended PCT vcpu_conf timeslice and priority values for dedicated RT vCPUs? We currently use 40 µs (RT_VCPU_TIMESLICE) and priority 2. Could the HV preempting at 40 µs boundaries explain a 70–80 µs tail? Is there a recommended trade-off (e.g., 40 µs vs 1 ms vs 25 ms)?
  2. Is WFI trapping configurable for dedicated vCPUs? The guest idle path uses PSCI CPU_SUSPEND (psci_idle), so it traps to the HV regardless of HCR_EL2.TWI. Is there a PCT/HV option to pass WFI/PSCI idle through for dedicated vCPUs, or a recommended idle configuration for RT guests?
  3. Does Thor support the carmel_rt_core_conf forward-progress mechanism (rt_core_mask, rt_core_window_us, rt_core_forward_progress_us, is_late_rt)? Our pct.json currently has all zeros. If supported on t264, what values are recommended for pCPU8..11, and is is_vm_rt_config_privileged / hyp_enable_rt_mode() needed?
  4. What is the recommended way to attribute these rare 70–80 µs spikes on the HV side (hypervisor event logging / Nsight Hypervisor Trace)? We see PCPU idle/HV cycle counters in the docs; are there specific events or a capture recipe you recommend?
  5. Are there known limitations or recommended configurations for RT Linux guests on Thor (vCPU priority, timeslice, IRQ routing, server placement) that we should apply?

We can provide full cyclictest histograms, pct top captures, and hypervisor traces if useful.

Thanks.

This forum is exclusively for developers who are part of the NVIDIA DRIVE® AGX SDK Developer Program | NVIDIA Developer . To post in the forum, please use an account associated with your corporate or university email address. This helps us ensure that the forum remains a platform for verified members of the developer program.

Dear @qing.qiu ,
I notice, you are using DOS 7.0.5 which is not a devzone release and you must have got it through other channels. Could you please check with your NVIDIA representative for right support channel.