RtSetFlushTLBTickMod

The function RtSetFlushTLBTickMod allows a process to set the frequency that the Cache Translation Lookaside Buffer (TLB) is flushed for the Process cores. This flushing of the TLB can be set to a modulo of the kernel's HAL timer period.

Syntax

Copy
BOOL RtSetFlushTLBTickMod(
    ULONG TickMod
);

Parameters

TickMod

This value specifies the frequency (in unit of HAL timer periods) at which the process cores' TLB are flushed. For example, the value 2 means two HAL timer periods.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE.

Remarks

Flushing a cache’s TLB is handled by the real-time kernel whenever a core is idle. However, in some circumstances developers may write code that does not allow the Process idle threads to run. In such cases, developers may need to periodically cause the cache’s TLB to be flushed so they do not run into cache coherency issues. To allow for this, Process provides RtSetFlushTLBTickMod, which allows a developer to set the real-time kernel to periodically flush the Process core’s cache TLB.

Since the real-time kernel handles most instances when the cache’s TLB needs to be flushed, the default value for the periodic flushing of the TLB is set to 0, meaning it is disabled.

For performance purposes, the value of TickMod should be a power of 2. Otherwise, the set value will be rounded up or down to a value of the nearest power of 2.

Whenever the remainder of the HAL tick count divided by the flush TLB tick mod is zero, each processor/core flushes its TLB.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RtssApi.h rtkrnl.lib

See Also: