From: Dave Hart Date: Mon, 20 Feb 2023 17:05:44 +0000 (-0500) Subject: [Bug 3786] Timer starvation on high-load Windows ntpd. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62f8c1b1495e19c3b7b3ed42dd63fef2db8f6c81;p=thirdparty%2Fntp.git [Bug 3786] Timer starvation on high-load Windows ntpd. bk: 63f3a868Te7OsfOxfl2eiKTBSL8gHw --- diff --git a/ChangeLog b/ChangeLog index 59a5dfe74..0ba366ce1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ --- -* [Bug 2410] syslog an error message on panic exceeded. +* [Bug 3786] Timer starvation on high-load Windows ntpd. +* [Bug 2410] syslog an error message on panic exceeded. * [Bug 3784] high-load ntpd on Windows deaf after enough ICMP TTL exceeded * [Bug 2525] Turn on automake subdir-objects across the project. * [Bug 3758] Provide a 'device' config statement for refclocks diff --git a/ports/winnt/ntpd/ntp_iocompletionport.c b/ports/winnt/ntpd/ntp_iocompletionport.c index 960e1abac..a190cedf0 100644 --- a/ports/winnt/ntpd/ntp_iocompletionport.c +++ b/ports/winnt/ntpd/ntp_iocompletionport.c @@ -1865,17 +1865,17 @@ GetReceivedBuffers(void) FALSE, INFINITE, TRUE); switch (index) { - case WAIT_OBJECT_0 + 0: /* Io event */ - DPRINTF(4, ("IoEvent occurred\n")); - have_packet = TRUE; + case WAIT_OBJECT_0 + 0: /* timer */ + timer(); break; case WAIT_OBJECT_0 + 1: /* exit request */ exit(0); break; - case WAIT_OBJECT_0 + 2: /* timer */ - timer(); + case WAIT_OBJECT_0 + 2: /* Io event */ + DPRINTF(7, ("IoEvent occurred\n")); + have_packet = TRUE; break; case WAIT_IO_COMPLETION: /* there might be something after APC */