Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2003 07:23:09 -0800 (PST)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_fork.c kern_synch.c
Message-ID:  <200310291523.h9TFN9dl024485@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310291523.h9TFN9dl024485>