From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by mx.groups.io with SMTP id smtpd.web12.35443.1599991835757007333 for ; Sun, 13 Sep 2020 03:10:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tFD8O0C4; spf=pass (domain: gmail.com, ip: 209.85.166.42, mailfrom: stanley.ganyezu@gmail.com) Received: by mail-io1-f42.google.com with SMTP id h4so15615806ioe.5 for ; Sun, 13 Sep 2020 03:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=h0KzUIqCoGBJLT05I8/i25/uqbNzkfO4c/l4sZ34rh8=; b=tFD8O0C4R2bLFgc0R+VJzbfzRE977Xmu8pJLC2EudiyI2iRNXUN86jp+nzoYwUwoIS 9wFfC46aXlCbrNr6slF9hV3sF/kKNuZ2ZzeNpWOSAwgwLyuthiS0YLqtDEVcx6LDeTZe ZQuTYifZeuB1ug/li/odXkxjRAsxCZ2C5T1E0EatTPbCUrhmslDvGlaRiqgOdpU5BZDo IyVaCbRGE0exU91koAeunG3mCv7Bxc2QQ8hEQlIG5BW9SefZUwrqKINdwxV+CeCjXX52 QxHRqCKrNgt/VPODq0Q5P3TFLdC9FbPm7b8QMOnMWIy8ZxC9+d9Bl3dskG2vLXb8s71D WU3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=h0KzUIqCoGBJLT05I8/i25/uqbNzkfO4c/l4sZ34rh8=; b=k9H0/Sr9SmbARRrWPIuAsKEm7WVvHs67wJrYb4lYHAycfZuLJ+jKC9Nc72sDkRohlF liixXMEjxXl7XU51tEoAuyuf8WE2Wyoj+ejkFXu+8fmFQCIe1l3qbD7LURIvSlrUjF4u SVdZrJZfDMBpP7thSy1zK5yR87nHgbPiUPJJgxPNKbgAGamUvMSeZrsS5pvP6DgO+Ukj qnf5gsRhsVmIT7H4PNEhyP2WaDf2Sizk2xaeYlV1zHdtSJfZWFyYZpf0IeDYwkiki1hs bi3jZxjo048T9d4nekcUkmz0uT7So14lZSCRM3QkfRMNxdI1S02eesM2YvvON5UE0UiA n4Ig== X-Gm-Message-State: AOAM53234VH7VHhcyDzgq+hhXfslJWq5/l82IAmISiOVkzZZ+Kiiq0zh mCoa57hwkSjpodV8n+mHTW1kJqSy3LruylrMVVKXTN05TzTCAq2R X-Google-Smtp-Source: ABdhPJyoiYrm9vl7nd1gtj8mZ/93Bmut8cM/FVKlssqh59AeP0KU9YQmEIyJhLXHUGDnRtEyh6ga/vHYKNBJnOewZhw= X-Received: by 2002:a5e:c00f:: with SMTP id u15mr7441249iol.6.1599991834706; Sun, 13 Sep 2020 03:10:34 -0700 (PDT) MIME-Version: 1.0 From: "Stanley Gan" Date: Sun, 13 Sep 2020 18:09:58 +0800 Message-ID: Subject: Hang in CoreCheckTimers To: devel@edk2.groups.io Content-Type: multipart/alternative; boundary="000000000000f387dc05af2f2087" --000000000000f387dc05af2f2087 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi All, I have some questions about MdeModulePkg\Core\Dxe\Event\Timer.c CoreCheckTimers. My system will keep looping in CoreCheckTimers in some scenarios: =C2=B7 CPU run very slow (Cache disabled) =C2=B7 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 " CoreSignalEvent (mEfiCheckTimerEvent)" 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 <=3D SystemTime) { Event->Timer.TriggerTime =3D SystemTime; CoreSignalEvent (mEfiCheckTimerEvent); } 2. If the system runs slowly, do we need to expand the timer interrupt interval? Is there any requirments about the ratio between CPU speed and timer interval? --000000000000f387dc05af2f2087 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi All,

=C2=A0

I have some questions about MdeModulePkg\Core\Dxe\Ev= ent\Timer.c=C2=A0 CoreCheckTimers.

My system will keep looping in CoreCheckTimers in some scenarios:

=C2=B7=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0CPU run very slow (Cache disabled)

=C2=B7=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A lot of timer even= t (Network stack enabled)

I= n normal boot, CoreCheckTimers will execute two times. 1st=C2=A0= time, it actually signifies timer event. 2nd=C2=A0time, because = there is no expired timer, it will exit quickly.

In my scenario, another time interrupt comes and upda= tes EfiSystemTime at second CoreCheckTimers. The system will keep looping i= n CoreCheckTimers.

My quest= ions are:

1.=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Is the " CoreSignalEvent (mEfiCheckTimerEvent)" line below necessary? Can we di= sable interrupt at TPL 30?

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 //

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // If that's before now, then res= et the timer to start from now

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 //

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (Event->Timer.TriggerTime &= lt;=3D SystemTime) {

=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Event->Timer.TriggerTime =3D System= Time;

=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0CoreSignalEvent (mEfiChe= ckTimerEvent);

=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 }

2.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0If the system runs= slowly, do we need to expand the timer interrupt interval? Is there any re= quirments about the ratio between CPU speed and timer interval?

--000000000000f387dc05af2f2087--