From owner-cvs-src@FreeBSD.ORG Wed Oct 29 07:23:11 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0476416A4CE; Wed, 29 Oct 2003 07:23:11 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8717D43FE0; Wed, 29 Oct 2003 07:23:10 -0800 (PST) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9TFNAXJ024486; Wed, 29 Oct 2003 07:23:10 -0800 (PST) (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9TFN9dl024485; Wed, 29 Oct 2003 07:23:09 -0800 (PST) (envelope-from bde) Message-Id: <200310291523.h9TFN9dl024485@repoman.freebsd.org> From: Bruce Evans Date: Wed, 29 Oct 2003 07:23:09 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_fork.c kern_synch.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2003 15:23:11 -0000 bde 2003/10/29 07:23:09 PST FreeBSD src repository Modified files: sys/kern kern_fork.c kern_synch.c Log: Removed mostly-dead code for setting switchtime after the idle loop clobbers this variable. Long ago, when the idle loop wasn't in a process, it set switchtime.tv_sec to zero to indicate that the time needs to be read after the idle loop finishes. The special case for this isn't needed now that there is an idle process (for each CPU). The time is read in the normal way when the idle process is switched away from. The seconds component of the time is only zero for the first second after the uptime is set, and the mostly-dead code was only executed during this time. (This was slightly broken by using uptimes instead of times relative to the Epoch -- in the original version the seconds component of the time was only 0 for the first second after the Epoch.) In mi_switch(), moved the setting of switchticks to just after the first (and now only) setting of switchtime. This setting used to be delayed since a late setting was needed for the idle case and an early setting was not needed. Now the early setting is needed so that fork_exit() doesn't need to set either switchtime or switchticks. Removed now-completely-rotted comment attached to this. Most of the code described by the comment had already moved to sched_switch(). Revision Changes Path 1.208 +0 -3 src/sys/kern/kern_fork.c 1.237 +2 -8 src/sys/kern/kern_synch.c