loop in CoreCheckTimers


Stanley Gan
 

Hi All,



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

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? Can we disable interrupt at TPL
30?

//

// 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?

Join discuss@edk2.groups.io to automatically receive all group messages.