RtQuerySystemPerfCaps

RtQuerySystemPerfCaps queries the performance capability of each logical processor for the specified ClassID.

Syntax

BOOL RtQuerySystemPerfCaps(
    ULONG ClassID,
    ULONG  SystemPerfCaps[]
);

Parameters

ClassID

Specifies the Class ID of the performance capabilities to be queried. Class ID (0, 1, 2, …) represents a software thread’s characteristic; i.e., the instruction set the thread executes on the logical processor.

SystemPerfCaps[]

A ULONG array to store current performance capabilities of Class ID on each active logical processor, including Windows logical processors and RTSS logical processors.

Return Value

Returns TRUE if the function succeeds. Returns FALSE if the function fails. GetLastError returns ERROR_NOT_SUPPORTED if Intel Thread Director is not supported, or ERROR_INVALID_PARAMETER if there are invalid parameters. 

Remarks

Thread Class IDs (0, 1, 2, …) represent a software thread's characteristics; i.e., the assembly instruction set (e.g., AVX2) the thread executes. With Intel Thread Director Technology (IDT), the logical processor feedbacks the Class ID of the thread running on it with enough history.

RTX64 does not dynamically migrate RTSS threads during thread scheduling. It is recommended that RTSS processes call RtQuerySystemPerfCaps for each ClassID to identify the performance ideal processor/processors. Since SetThreadIdealProcessor or SetThreadAffinityMask cannot migrate Interrupt Service Thread (IST), Timer Service Thread (TST), and NPX used thread at run-time, you may need to affinity those threads to their performance ideal processors at create time if you know the instruction set those threads use.

On performance hybrid architectures, there are performance cores (P-Core) and efficiency cores (E-Core). To optimize RTX64 performance on a hybrid architecture, you may want to run the HybridInfo utility, available for download from the Support Site, before you assign processors to Windows and RTSS using the RTX64 Activation and Configuration utility. The HybridInfo utility displays each core type, performance capability, and thread class ID for different sets of assembly instructions. The Class IDs for instruction sets are as follows:

Instruction Set Class ID
Default 0
Integer Registers 1
AVX/AVX2 2
Pause 3

Requirements

Minimum Supported Version RTX64 4.3
Header RtssApi.h
Library Rtx_Rtss.lib (RTSS)

See Also:

SetThreadIdealProcessor

SetThreadAffinityMask