> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RT Configuration — RT with KVM

## **Real-Time Kernel Configuration**

### Kernel Command-Line Boot Parameters

Kernel command-line parameters control how CPUs, interrupts, scheduling, and power management behave at boot time — before user space starts. These are the primary knobs for tuning Linux into a deterministic real-time system.

| Parameter | Purpose | Example |
| - | - | - |
| `isolcpus` | Removes listed CPUs from general scheduler load balancing | `isolcpus=2-7` |
| `irqaffinity` | Restricts hardware interrupts to specific CPUs | `irqaffinity=0-1` |
| `rcu_nocbs` | Moves RCU callbacks away from specified CPUs | `rcu_nocbs=2-7` |
| `rcupdate.rcu_expedited` | Speeds up RCU grace periods, reduces latency unpredictability | `rcupdate.rcu_expedited=1` |
| `cpuidle.off` | Disables CPU idle states for deterministic scheduling | `cpuidle.off=1` |
| `nohz_full` | Eliminates periodic scheduler ticks on selected CPUs | `nohz_full=2-7` |

**CPU Partitioning:**

```
CPU 0       → Housekeeping CPU   — handles interrupts, kernel tasks
CPU 1–3     → RT Isolated CPUs   — run deterministic workloads
```

Typical combined cmdline:

```
isolcpus=1-3 nohz_full=1-3 rcu_nocbs=1-3 irqaffinity=0
```

***

### Applying Parameters via Yocto Build

QLI 2.0 applies kernel command-line parameters through the Yocto build system via the `KERNEL_CMDLINE_EXTRA` variable.

**Common configuration file:**

```
<Workspace_Path>/meta-qcom/conf/machine/include/qcom-common.inc
```

RT tuning variables exposed:

```bitbake theme={null}
QCOM_RT_CPU           ?= ""
QCOM_IRQAFF           ?= ""
QCOM_RCU_NOCBS        ?= ""
QCOM_RCU_EXPEDITED    ?= ""
QCOM_CPUIDLE_OFF      ?= ""
QCOM_NOHZ_FULL        ?= ""
```

These are combined and appended automatically when the RT kernel is selected:

```bitbake theme={null}
KERNEL_CMDLINE_EXTRA:append = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel',\
                              'linux-qcom-rt linux-qcom-next-rt', \
                              ' ${RT_KERNEL_CMDLINE}', '', d)}"
```

**Machine-specific overrides** — set in `meta-qcom/conf/machine/<machine>.conf`. Example for IQ-9075 EVK:

```bitbake theme={null}
# meta-qcom/conf/machine/iq-9075-evk.conf
QCOM_RT_CPU        = "2-7"
QCOM_IRQAFF        = "0-1"
QCOM_RCU_NOCBS     = "2-7"
QCOM_RCU_EXPEDITED = "1"
QCOM_CPUIDLE_OFF   = "1"
QCOM_NOHZ_FULL     = "2-7"
```

***

### Verifying Applied Parameters at Runtime

```bash theme={null}
root@iq-9075-evk:~# cat /proc/cmdline
root=PARTLABEL=rootfs rw rootwait console=ttyMSM0,115200 qcom_scm.download_mode=1 \
isolcpus=2-7 irqaffinity=0-1 rcu_nocbs=2-7 rcupdate.rcu_expedited=1 cpuidle.off=1 nohz_full=2-7 efi=runtime
```

***

> [card] [Build — RT with KVM](https://dragonwingdocs-staging.qualcomm.com/Suites/Industrial-Edge-Suite/rt-with-kvm-build.md)
>
> KAS build commands for RT + KVM

> [card] [RT Benchmarks IQ9 (KVM)](https://dragonwingdocs-staging.qualcomm.com/Suites/Industrial-Edge-Suite/kvm-rt-benchmarks-iq9.md)
>
> Cyclictest results under KVM on IQ-9075
