Subject: Re: port-i386/12682: idle loop causes awful performance hits
To: None <mycroft@netbsd.org, gnats-admin@netbsd.org,>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: netbsd-bugs
Date: 02/09/2005 17:45:02
The following reply was made to PR port-i386/12682; it has been noted by GNATS.

From: Matthias Drochner <M.Drochner@fz-juelich.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-i386/12682: idle loop causes awful performance hits
Date: Tue, 08 Feb 2005 23:12:54 +0100

 This is due to a botch in the idle loop which is also present
 in the 1.6 release branch:
 The "sti" must be followed by the "hlt" immediately. As implemented,
 a process wakeup during the tests and calls for apm and idlezero
 hasn't an effect until the next clock tick, causing a delay somewhere
 between 0 and 10ms.
 (Fixed it for myself by commenting out everything inbetween. A real
 solution would need some serious restructuring of the idle loop.)
 
 best regards
 Matthias