Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IcoUu-000442-RA for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:37:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IcoUu-000437-6X for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:37:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcoUu-00042u-3K for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:37:40 -0400 Received: from hall.aurel32.net ([88.191.38.19]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IcoUt-0002YE-Oh for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:37:39 -0400 Message-ID: <4702AC0F.1000906@aurel32.net> Date: Tue, 02 Oct 2007 22:37:35 +0200 From: Aurelien Jarno MIME-Version: 1.0 Subject: Re: [Qemu-devel] QEMU/MIPS & dyntick kernel References: <20071002200644.GA19140@hall.aurel32.net> <4702A99B.7020008@qumranet.com> In-Reply-To: <4702A99B.7020008@qumranet.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: linux-mips@linux-mips.org Avi Kivity a écrit : > Aurelien Jarno wrote: >> Hi, >> >> As announced by Ralf Baechle, dyntick is now available on MIPS. I gave a >> try on QEMU/MIPS, and unfortunately it doesn't work correctly. >> >> In some cases the kernel schedules an event very near in the future, >> which means the timer is scheduled a few cycles only from its current >> value. Unfortunately under QEMU, the timer runs too fast compared to the >> speed at which instructions are execution. > > Sounds like a kernel bug. Can't there conceivably exist real hardware > (or a real timeout) that exhibits the same timing? > > Especially today with variable clock frequencies, I don't see how the > kernel can rely on exact timing. > Well on real hardware, the instruction rate and the timer are linked: the timer run at half the speed of the CPU. As the corresponding assembly code is very small, only uses registers and is run in kernel mode, you know for sure that 48 cycles is more than enough. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net