Using wRTOS on a Performance Hybrid Architecture

Beginning with Raptor Lake (13th/14th Gen) and Alder Lake (12th Gen), Intel® provides a performance hybrid architecture combining Performance-cores (P-cores) and Efficient-cores (E-cores). UEFI BIOS orders the active cores on the system from P-cores to E-cores. That is, if you have 4 P-cores and 4 E-cores, the processor numbers assigned to P-cores will be 0, 1, 2, 3 and the E-cores will be 4, 5, 6, 7. wRTOS statically partitions the number of processors between Windows and RTSS at boot time. Since Windows processors are assigned first, P-cores are allocated to Windows. Remaining P-cores and E-cores are assigned to RTSS.

Note: When executing a critical section, E-cores may reduce the speed of P-cores. Some UEFI/BIOS may have the option to disable E-cores.

In this topic:

Optimizing wRTOS Performance

IntervalZero provides utilities that display each core type, performance capability, and thread class ID for different assembly instructions. This information can be used as a reference when deciding how to partition cores between Windows and wRTOS or choosing which cores to run threads on.

Thread Director and RTSS Cores

Raptor Lake and Alder Lake also introduced a new hardware feature called Thread Director. This feature monitors thread runtime instructions to determine a thread’s workload, which is then assigned a class. Thread Director uses its energy and performance core scoring logic to help determine the best cores to run a given thread.

If the system supports Thread Director, wRTOS will enable Thread Director on each RTSS core by default. With this enabled, the RTSS scheduler will save a thread’s historical class ID on a context switch. This allows users to query the Class ID and Ideal core for an RTSS thread. As mentioned above, the HybridInfo utility can also provide information on ideal cores based on a thread’s Class ID. The output from this utility will allow you to make an educated assignment of a thread’s ideal processor before it has run, based on what you know the thread will be executing. This is useful in cases where a running RTSS thread cannot be moved. For example, once an RTSS thread uses AVX it cannot be moved to another core.

You can enable/disable Thread Director on RTSS cores by changing an internal wRTOS register value. To do this, follow the steps below.

To Enable or Disable Thread Director on RTSS Processors:

  1. Open the Registry Editor (regedit.exe).
  2. Under Computer, navigate to HKEY LOCAL MACHINE > SOFTWARE > IntervalZero > wRTOS.
  3. Right-click on ThreadDirectorDisableFlag and then click Modify.
  4. Do one of the following:
  5. To enable Thread Director, set Value data to 1.
  6. To disable Thread Director, set Value data to 0.
  7. Click Ok.

Related Topics: