Re: loop in CoreCheckTimers

Laszlo Ersek

(CC Jeff)

On 09/07/20 02:29, Stanley Gan wrote:
Hi All,

I have some questions about MdeModulePkg\Core\Dxe\Event\Timer.c

My system will keep looping in CoreCheckTimers in some scenarios:

· CPU run very slow (Cache disabled)

· A lot of timer event (Network stack enabled)

In normal boot, CoreCheckTimers will execute two times. 1st time, it
actually signifies timer event. 2nd time, because there is no expired
timer, it will exit quickly.

In my scenario, another time interrupt comes and updates EfiSystemTime at
second CoreCheckTimers. The system will keep looping in CoreCheckTimers.

My questions are:

1. Is the red line below necessary?
What do you mean by "red line"?

Can we disable interrupt at TPL


// If that's before now, then reset the timer to start from now


if (Event->Timer.TriggerTime <= SystemTime) {

Event->Timer.TriggerTime = SystemTime;

CoreSignalEvent (mEfiCheckTimerEvent);


2. If the system runs slowly, do we need to expand the timer
interrupt interval? Is there any golden standard about the ratio between
CPU speed and timer interval?
Perhaps related: commit 239b50a86370 ("OvmfPkg: End timer interrupt
later to avoid stack overflow under load", 2020-06-18).


Join to automatically receive all group messages.