Received: by mail.netbsd.org (Postfix, from userid 605) id BE24014A304; Thu, 15 Dec 2011 03:42:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id E2D0D14A2F9 for ; Thu, 15 Dec 2011 03:42:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 67MLLlpW39jL for ; Thu, 15 Dec 2011 03:42:33 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id 278CB14A2C6 for ; Thu, 15 Dec 2011 03:42:33 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 528E7175DD; Thu, 15 Dec 2011 03:42:33 +0000 (UTC) MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Date: Thu, 15 Dec 2011 03:42:33 +0000 From: "Jared D. McNeill" Subject: CVS commit: src/sys/arch/usermode To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20111215034233.528E7175DD@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Jared D. McNeill" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: jmcneill Date: Thu Dec 15 03:42:33 UTC 2011 Modified Files: src/sys/arch/usermode/dev: clock.c cpu.c src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: Improve usermode timecounter. It's unreasonable to assume that we'll get 100 "SIGALRM" per second with an ITIMER_REAL at 100Hz on a HZ=100 host as the timer may expire before a pending signal has been delivered. Instead of setitimer, use timer_create + timer_settime and from our intr handler use timer_getoverrun to determine how many ticks we have missed. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/usermode/dev/clock.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/usermode/dev/cpu.c cvs rdiff -u -r1.40 -r1.41 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.46 -r1.47 src/sys/arch/usermode/usermode/thunk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.